Commit 87588caf authored by James Almer's avatar James Almer

Revert "avcodec/decode: copy the output parameters from the last bsf in the...

Revert "avcodec/decode: copy the output parameters from the last bsf in the chain back to the AVCodecContext"

This reverts commit f631c328.

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 produced crashes in
some library users like Firefox[1].

Revert until a better solution is found to internally propagate the filtered
extradata back into the decoder context, or a decision is made to change the
API.

[1] https://bugzilla.mozilla.org/show_bug.cgi?id=1486080Signed-off-by: 's avatarJames Almer <jamrial@gmail.com>
parent 156120fc
......@@ -281,10 +281,6 @@ int ff_decode_bsfs_init(AVCodecContext *avctx)
bsfs_str++;
}
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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment