mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-12 10:00:08 +01:00
parsers: initialize MpegEncContext.slice_context_count to 1
The mpeg4 video, H264 and VC-1 parser hold (directly or indirectly) a MpegEncContext in their private context. Since they do not call the common mpegvideo init function slice_context_count has explicitly set to 1. Prevents a null pointer dereference in the h264 parser and fixes bug 193.
This commit is contained in:
@@ -330,6 +330,7 @@ static int init(AVCodecParserContext *s)
|
||||
{
|
||||
H264Context *h = s->priv_data;
|
||||
h->thread_context[0] = h;
|
||||
h->s.slice_context_count = 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user