avcodec/h264_mp4toannexb_bsf: reset the new IDR flag when SPS/PPS is seen.
authorBenoit Fouet <benoit.fouet@free.fr>
Tue, 30 Sep 2014 11:06:40 +0000 (13:06 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 5 Oct 2014 12:47:04 +0000 (14:47 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/h264_mp4toannexb_bsf.c

index be42304..ae96ee9 100644 (file)
@@ -186,9 +186,9 @@ static int h264_mp4toannexb_filter(AVBitStreamFilterContext *bsfc,
             goto fail;
 
         if (unit_type == 7)
-            ctx->idr_sps_seen = 1;
+            ctx->idr_sps_seen = ctx->new_idr = 1;
         else if (unit_type == 8) {
-            ctx->idr_pps_seen = 1;
+            ctx->idr_pps_seen = ctx->new_idr = 1;
             /* if SPS has not been seen yet, prepend the AVCC one to PPS */
             if (!ctx->idr_sps_seen) {
                 if (ctx->sps_offset == -1)