h264_mp4toannexb_bsf: Fix spurious warning when stream has SPS and PPS units.
authorPhilip Langdale <philipl@overt.org>
Tue, 15 Mar 2011 05:14:22 +0000 (22:14 -0700)
committerRonald S. Bultje <rsbultje@gmail.com>
Tue, 15 Mar 2011 11:20:44 +0000 (07:20 -0400)
Signed-off-by: Philip Langdale <philipl@overt.org>
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
libavcodec/h264_mp4toannexb_bsf.c

index df49b34..3754f2a 100644 (file)
@@ -116,8 +116,11 @@ static int h264_mp4toannexb_filter(AVBitStreamFilterContext *bsfc,
             memcpy(out+total_size-unit_size,   extradata+2, unit_size);
             extradata += 2+unit_size;
 
-            if (!unit_nb && !sps_done++)
+            if (!unit_nb && !sps_done++) {
                 unit_nb = *extradata++; /* number of pps unit(s) */
+                if (unit_nb)
+                    pps_seen = 1;
+            }
         }
 
         if(out)