mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
solve the problem when video finished
This commit is contained in:
parent
9f009e0e04
commit
0a6edd02ca
|
@ -685,7 +685,8 @@ void CVideo::finish_frames(OutputStream* pStream)
|
|||
if (!ret_recv)
|
||||
{
|
||||
/* rescale output packet timestamp values from codec to stream timebase */
|
||||
av_packet_rescale_ts(&Packet, pStream->enc->time_base, pStream->st->time_base);
|
||||
if(pStream->st->codec->codec_type == AVMEDIA_TYPE_VIDEO)
|
||||
av_packet_rescale_ts(&Packet, pStream->st->codec->time_base, pStream->st->time_base);
|
||||
Packet.stream_index = pStream->st->index;
|
||||
|
||||
if (int ret = av_interleaved_write_frame(m_pFormatContext, &Packet))
|
||||
|
|
Loading…
Reference in a new issue