summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/h264_parser.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/libavcodec/h264_parser.c b/libavcodec/h264_parser.c
index dabd475f93..d9af8c9c36 100644
--- a/libavcodec/h264_parser.c
+++ b/libavcodec/h264_parser.c
@@ -309,11 +309,17 @@ static void close(AVCodecParserContext *s)
ff_h264_free_context(h);
}
+static int init(AVCodecParserContext *s)
+{
+ H264Context *h = s->priv_data;
+ h->thread_context[0] = h;
+ return 0;
+}
AVCodecParser h264_parser = {
{ CODEC_ID_H264 },
sizeof(H264Context),
- NULL,
+ init,
h264_parse,
close,
h264_split,