In order not to break a sequence like "SPS IDR SPS IDR", the boolean telling that the SPS/PPS has been seen should always be set. --- libavcodec/h264_mp4toannexb_bsf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/h264_mp4toannexb_bsf.c b/libavcodec/h264_mp4toannexb_bsf.c index a003a1d..e0c1385 100644 --- a/libavcodec/h264_mp4toannexb_bsf.c +++ b/libavcodec/h264_mp4toannexb_bsf.c @@ -176,7 +176,7 @@ static int h264_mp4toannexb_filter(AVBitStreamFilterContext *bsfc, if (buf + nal_size > buf_end || nal_size < 0) goto fail; - if (ctx->first_idr && (unit_type == 7 || unit_type == 8)) + if (unit_type == 7 || unit_type == 8) ctx->idr_sps_pps_seen = 1; /* if this is a new IDR picture following an IDR picture, reset the idr flag. -- 2.0.1.442.g7fe6834 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel