Dont be so picky on decoding pps in extradata.
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 1 Mar 2011 14:59:00 +0000 (15:59 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 3 Apr 2011 14:40:11 +0000 (16:40 +0200)
Fixes issue2517

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

index e082320..51ca7a4 100644 (file)
@@ -986,7 +986,7 @@ int ff_h264_decode_extradata(H264Context *h)
         cnt = *(p++); // Number of pps
         for (i = 0; i < cnt; i++) {
             nalsize = AV_RB16(p) + 2;
-            if(decode_nal_units(h, p, nalsize)  != nalsize) {
+            if(decode_nal_units(h, p, nalsize) < 0) {
                 av_log(avctx, AV_LOG_ERROR, "Decoding pps %d from avcC failed\n", i);
                 return -1;
             }