avcodec/h264_mp4toannexb_bsf: prepend global headers before any in stream parameter sets

Fixes h264_mp4toannexb_bsf_failure.mkv

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 289b149cec)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer
2014-03-26 18:09:23 +01:00
parent 5f7e6b9c37
commit 551f36955c

View File

@@ -154,7 +154,7 @@ pps:
goto fail; goto fail;
/* prepend only to the first type 5 NAL unit of an IDR picture */ /* prepend only to the first type 5 NAL unit of an IDR picture */
if (ctx->first_idr && unit_type == 5) { if (ctx->first_idr && (unit_type == 5 || unit_type == 7 || unit_type == 8)) {
if ((ret=alloc_and_copy(poutbuf, poutbuf_size, if ((ret=alloc_and_copy(poutbuf, poutbuf_size,
avctx->extradata, avctx->extradata_size, avctx->extradata, avctx->extradata_size,
buf, nal_size)) < 0) buf, nal_size)) < 0)