h264: Try parsing SPS as complete NAL in more cases
authorMichael Niedermayer <michaelni@gmx.at>
Wed, 12 Jun 2013 22:46:15 +0000 (00:46 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 12 Jun 2013 23:43:09 +0000 (01:43 +0200)
Fixes Ticket2580

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

index efce095..233a7c8 100644 (file)
@@ -4777,7 +4777,7 @@ again:
                 break;
             case NAL_SPS:
                 init_get_bits(&h->gb, ptr, bit_length);
-                if (ff_h264_decode_seq_parameter_set(h) < 0 && (h->is_avc ? (nalsize != consumed) && nalsize : 1)) {
+                if (ff_h264_decode_seq_parameter_set(h) < 0 && (h->is_avc ? nalsize : 1)) {
                     av_log(h->avctx, AV_LOG_DEBUG,
                            "SPS decoding failure, trying again with the complete NAL\n");
                     if (h->is_avc)