1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-09-08 16:56:57 +02:00

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.
This commit is contained in:
Anton Khirnov 2013-11-04 17:59:25 +01:00
parent ecf442a58b
commit 9eda9d3322

View File

@ -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)