summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2020-11-09 10:12:59 -0300
committerJames Almer <jamrial@gmail.com>2020-11-09 15:57:56 -0300
commitd2dcb113f8e4e6e372007a354a600e6c2579ea8b (patch)
treef16a61415f74012bcea20a378a7621a22e48c017 /libavcodec
parent5c7823ff1cffff55f25169492d263bca934880a2 (diff)
avcodec/utils: clear the packet props queue on flushing
This ensures no queued timestamps or side data are kept and used after seeking, preventing potential desyncs. Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/utils.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index c10539593e..9b074e2dda 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);