avcodec/ituh263dec: detect and warn about RTP
authorMichael Niedermayer <michaelni@gmx.at>
Sat, 24 Aug 2013 21:06:59 +0000 (23:06 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sat, 24 Aug 2013 21:06:59 +0000 (23:06 +0200)
Fixes Ticket925
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/ituh263dec.c

index cd6ed4e..08aeb30 100644 (file)
@@ -874,6 +874,10 @@ int ff_h263_decode_picture_header(MpegEncContext *s)
 
     align_get_bits(&s->gb);
 
+    if (show_bits(&s->gb, 2) == 2 && s->avctx->frame_number == 0) {
+         av_log(s->avctx, AV_LOG_WARNING, "Header looks like RTP instead of H.263\n");
+    }
+
     startcode= get_bits(&s->gb, 22-8);
 
     for(i= get_bits_left(&s->gb); i>24; i-=8) {