summaryrefslogtreecommitdiffstats
path: root/libavcodec/decode.c
diff options
context:
space:
mode:
authorJames Almer <[email protected]>2018-07-26 20:43:19 -0300
committerJames Almer <[email protected]>2018-08-16 23:43:13 -0300
commitf631c328e680a3dd491936b92f69970c20cdcfc7 (patch)
treeb20af32af38e04118d8cdb7c206dd5d6794780a1 /libavcodec/decode.c
parent94fe138de0ba5892a7051f5b47c191a41b78805a (diff)
avcodec/decode: copy the output parameters from the last bsf in the chain back to the AVCodecContext
Certain AVCodecParameters, like the contents of the extradata, may be changed by the init() function of any of the bitstream filters in the chain. Signed-off-by: James Almer <[email protected]>
Diffstat (limited to 'libavcodec/decode.c')
-rw-r--r--libavcodec/decode.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/decode.c b/libavcodec/decode.c
index 2e82f6b506..4607e9f318 100644
--- a/libavcodec/decode.c
+++ b/libavcodec/decode.c
@@ -281,6 +281,10 @@ 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);