diff options
author | James Almer <jamrial@gmail.com> | 2018-09-12 15:01:14 -0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2018-10-24 16:43:33 -0300 |
commit | 87588caf8cff318cd022ad5002304198c6ddbd51 (patch) | |
tree | e4a9751fabb6a5533d99339a4a6323729115d342 /libavcodec/decode.c | |
parent | 156120fcf8fa7326e7ade2c2478c8be6536e69ad (diff) | |
download | ffmpeg-streaming-87588caf8cff318cd022ad5002304198c6ddbd51.zip ffmpeg-streaming-87588caf8cff318cd022ad5002304198c6ddbd51.tar.gz |
Revert "avcodec/decode: copy the output parameters from the last bsf in the chain back to the AVCodecContext"
This reverts commit f631c328e680a3dd491936b92f69970c20cdcfc7.
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=1486080
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/decode.c')
-rw-r--r-- | libavcodec/decode.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/libavcodec/decode.c b/libavcodec/decode.c index 4607e9f..2e82f6b 100644 --- a/libavcodec/decode.c +++ b/libavcodec/decode.c @@ -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); |