avcodec/decode: copy the output parameters from the last bsf in the chain back to...
authorJames Almer <jamrial@gmail.com>
Thu, 26 Jul 2018 23:43:19 +0000 (20:43 -0300)
committerJames Almer <jamrial@gmail.com>
Fri, 17 Aug 2018 02:43:13 +0000 (23:43 -0300)
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 <jamrial@gmail.com>
libavcodec/decode.c

index 2e82f6b..4607e9f 100644 (file)
@@ -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);