[FFmpeg-cvslog] h264: free the tables and uninitialize the context on flush
Anton Khirnov
git at videolan.org
Thu Nov 14 21:21:56 CET 2013
ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Mon Nov 4 17:59:25 2013 +0100| [9eda9d3322a6ea91830a754f2edee222adae7e67] | committer: Anton Khirnov
h264: free the tables and uninitialize the context on flush
Prevents referencing empty frames when the first packet after the flush
does not contain a frame.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9eda9d3322a6ea91830a754f2edee222adae7e67
---
libavcodec/h264.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 8faefbd..1444fc6 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -2768,6 +2768,9 @@ static void flush_dpb(AVCodecContext *avctx)
h->parse_context.overread_index = 0;
h->parse_context.index = 0;
h->parse_context.last_index = 0;
+
+ free_tables(h, 1);
+ h->context_initialized = 0;
}
int ff_init_poc(H264Context *h, int pic_field_poc[2], int *pic_poc)
More information about the ffmpeg-cvslog
mailing list