Browse code

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 289b149cecb381522cc9ccdf382825330169c655)

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

Michael Niedermayer authored on 2014/03/27 02:09:23
Showing 1 changed files
... ...
@@ -175,7 +175,7 @@ static int h264_mp4toannexb_filter(AVBitStreamFilterContext *bsfc,
175 175
             goto fail;
176 176
 
177 177
         /* prepend only to the first type 5 NAL unit of an IDR picture */
178
-        if (ctx->first_idr && unit_type == 5) {
178
+        if (ctx->first_idr && (unit_type == 5 || unit_type == 7 || unit_type == 8)) {
179 179
             if ((ret=alloc_and_copy(poutbuf, poutbuf_size,
180 180
                                avctx->extradata, avctx->extradata_size,
181 181
                                buf, nal_size)) < 0)