h264: slice-mt: check master context for valid current_picture_ptr
authorJanne Grunau <janne-libav@jannau.net>
Wed, 5 Dec 2012 19:08:01 +0000 (20:08 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Thu, 6 Dec 2012 03:45:04 +0000 (04:45 +0100)
Fixes errors in slice based multithreading introduced in 0b300daad2f5.

libavcodec/h264.c

index a93d07e..41845ca 100644 (file)
@@ -2709,7 +2709,7 @@ static int decode_slice_header(H264Context *h, H264Context *h0)
             s->picture_structure = last_pic_structure;
             s->dropable          = last_pic_dropable;
             return AVERROR_INVALIDDATA;
-        } else if (!s->current_picture_ptr) {
+        } else if (!s0->current_picture_ptr) {
             av_log(s->avctx, AV_LOG_ERROR,
                    "unset current_picture_ptr on %d. slice\n",
                    h0->current_slice + 1);