]> git.sesse.net Git - ffmpeg/commitdiff
Revert "decode: copy the output parameters from the last bsf in the chain back to...
authorJames Almer <jamrial@gmail.com>
Wed, 12 Sep 2018 18:21:09 +0000 (15:21 -0300)
committerJames Almer <jamrial@gmail.com>
Sat, 27 Oct 2018 03:02:13 +0000 (00:02 -0300)
This reverts commit 662558f985f50834eebe82d6b6854c66f33ab320.

The avcodec_parameters_to_context() call was freeing and reallocating
AVCodecContext->extradata, essentially taking ownership of it, which according
to the doxy is user owned. This is an API break and has produces crashes in
some library users like Firefox.
Revert until a better solution is found to internally propagate the filtered
extradata back into the decoder context.

Signed-off-by: James Almer <jamrial@gmail.com>
libavcodec/decode.c

index d10a2c8b5873a56c0d271bf481c275bcd7a3c99b..2dab7f2a71d5d34b60d8202aad1784c4b752f0bd 100644 (file)
@@ -221,10 +221,6 @@ int ff_decode_bsfs_init(AVCodecContext *avctx)
             goto fail;
     }
 
-    ret = avcodec_parameters_to_context(avctx, s->bsfs[s->nb_bsfs - 1]->par_out);
-    if (ret < 0)
-        return ret;
-
     return 0;
 fail:
     ff_decode_bsfs_uninit(avctx);