avcodec/mpeg12dec: Provide debug level log on skiped P/B frames
authorMichael Niedermayer <michael@niedermayer.cc>
Sat, 18 Feb 2017 18:03:39 +0000 (19:03 +0100)
committerMichael Niedermayer <michael@niedermayer.cc>
Sun, 19 Feb 2017 01:07:12 +0000 (02:07 +0100)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/mpeg12dec.c

index 6397907..f3cf6eb 100644 (file)
@@ -2660,6 +2660,8 @@ static int decode_chunks(AVCodecContext *avctx, AVFrame *picture,
                     if (s2->pict_type == AV_PICTURE_TYPE_B) {
                         if (!s2->closed_gop) {
                             skip_frame = 1;
+                            av_log(s2->avctx, AV_LOG_DEBUG,
+                                   "Skipping B slice due to open GOP\n");
                             break;
                         }
                     }
@@ -2671,6 +2673,8 @@ static int decode_chunks(AVCodecContext *avctx, AVFrame *picture,
                      * we have an invalid header. */
                     if (s2->pict_type == AV_PICTURE_TYPE_P && !s->sync) {
                         skip_frame = 1;
+                        av_log(s2->avctx, AV_LOG_DEBUG,
+                               "Skipping P slice due to !sync\n");
                         break;
                     }
                 }