[FFmpeg-devel] [PATCH] avcodec/utils: clear the packet props queue on flushing

James Almer jamrial at gmail.com
Mon Nov 9 18:15:59 EET 2020


On 11/9/2020 1:14 PM, Paul B Mahol wrote:
> Is this fixing known bugs?

https://github.com/mpv-player/mpv/issues/8248 in theory.

> 
> On Mon, Nov 9, 2020 at 3:16 PM James Almer <jamrial at gmail.com> wrote:
> 
>> This ensures no queued timestamps or side data are kept and used after
>> seeking, preventing potential desyncs.
>>
>> Signed-off-by: James Almer <jamrial at gmail.com>
>> ---
>>   libavcodec/utils.c | 4 ++++
>>   1 file changed, 4 insertions(+)
>>
>> diff --git a/libavcodec/utils.c b/libavcodec/utils.c
>> index db51512e15..a8599b3936 100644
>> --- a/libavcodec/utils.c
>> +++ b/libavcodec/utils.c
>> @@ -1093,6 +1093,10 @@ void avcodec_flush_buffers(AVCodecContext *avctx)
>>       av_packet_unref(avci->compat_encode_packet);
>>       av_packet_unref(avci->buffer_pkt);
>>
>> +    av_packet_unref(avci->last_pkt_props);
>> +    avpriv_packet_list_free(&avci->pkt_props,
>> +                            &avci->pkt_props_tail);
>> +
>>       av_frame_unref(avci->es.in_frame);
>>       av_packet_unref(avci->ds.in_pkt);
>>
>> --
>> 2.29.2
>>
>> _______________________________________________
>> ffmpeg-devel mailing list
>> ffmpeg-devel at ffmpeg.org
>> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>>
>> To unsubscribe, visit link above, or email
>> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
> 



More information about the ffmpeg-devel mailing list