[FFmpeg-cvslog] avcodec/h264_mp4toannexb_bsf: reset the new IDR flag when SPS/PPS is seen.

Benoit Fouet git at videolan.org
Sun Oct 5 15:05:24 CEST 2014


ffmpeg | branch: master | Benoit Fouet <benoit.fouet at free.fr> | Tue Sep 30 13:06:40 2014 +0200| [904cfd257db56f8146e7053bb9053ab53122f735] | committer: Michael Niedermayer

avcodec/h264_mp4toannexb_bsf: reset the new IDR flag when SPS/PPS is seen.

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=904cfd257db56f8146e7053bb9053ab53122f735
---

 libavcodec/h264_mp4toannexb_bsf.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavcodec/h264_mp4toannexb_bsf.c b/libavcodec/h264_mp4toannexb_bsf.c
index be42304..ae96ee9 100644
--- a/libavcodec/h264_mp4toannexb_bsf.c
+++ b/libavcodec/h264_mp4toannexb_bsf.c
@@ -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)



More information about the ffmpeg-cvslog mailing list