avformat/mpegtsenc: More verbose warning messages in case of missing video ES startcodes
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 16 Sep 2014 01:56:03 +0000 (03:56 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 16 Sep 2014 01:56:37 +0000 (03:56 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/mpegtsenc.c

index 0184d871490a59652e46a481608125a1abfa4cec..791356c7041713f9441e18adc2df027b9b570a55 100644 (file)
@@ -1197,7 +1197,9 @@ int ff_check_h264_startcode(AVFormatContext *s, const AVStream *st, const AVPack
                    "('-bsf:v h264_mp4toannexb' option with ffmpeg)\n");
             return AVERROR_INVALIDDATA;
         }
-        av_log(s, AV_LOG_WARNING, "H.264 bitstream error, startcode missing\n");
+        av_log(s, AV_LOG_WARNING, "H.264 bitstream error, startcode missing, size %d", pkt->size);
+        if (pkt->size) av_log(s, AV_LOG_WARNING, " data %08X", AV_RB32(pkt->data));
+        av_log(s, AV_LOG_WARNING, "\n");
     }
     return 0;
 }
@@ -1209,7 +1211,9 @@ static int check_hevc_startcode(AVFormatContext *s, const AVStream *st, const AV
             av_log(s, AV_LOG_ERROR, "HEVC bitstream malformed, no startcode found\n");
             return AVERROR_PATCHWELCOME;
         }
-        av_log(s, AV_LOG_WARNING, "HEVC bitstream error, startcode missing\n");
+        av_log(s, AV_LOG_WARNING, "HEVC bitstream error, startcode missing, size %d", pkt->size);
+        if (pkt->size) av_log(s, AV_LOG_WARNING, " data %08X", AV_RB32(pkt->data));
+        av_log(s, AV_LOG_WARNING, "\n");
     }
     return 0;
 }