avcodec/h264: also show frames with missing fields when CODEC_FLAG2_SHOW_ALL is set
authorMichael Niedermayer <michaelni@gmx.at>
Mon, 22 Dec 2014 20:17:49 +0000 (21:17 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 22 Dec 2014 20:42:36 +0000 (21:42 +0100)
This allows viewing more of ticket2254

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/h264.c

index e5073089d9b5599ed9a4d0c5134f0b86e07d5e6d..f40449eb0a344617c1343c42f2867a46ee7a15e7 100644 (file)
@@ -762,7 +762,10 @@ static void decode_postinit(H264Context *h, int setup_finished)
          * yet, so we assume the worst for now. */
         // if (setup_finished)
         //    ff_thread_finish_setup(h->avctx);
-        return;
+        if (cur->field_poc[0] == INT_MAX && cur->field_poc[1] == INT_MAX)
+            return;
+        if (h->avctx->hwaccel || !(h->avctx->flags2 & CODEC_FLAG2_SHOW_ALL))
+            return;
     }
 
     cur->f.interlaced_frame = 0;