diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-12-17 03:28:25 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-12-17 05:14:11 +0100 |
commit | ddd7dac7ae0515ea6036396bb50d7bb5f702aeef (patch) | |
tree | c3a49076e130eea9fb42c13a06a6e7e0cc968155 | |
parent | 3305acdc92fa37869f160a11a87741c8a0de0454 (diff) | |
download | ffmpeg-ddd7dac7ae0515ea6036396bb50d7bb5f702aeef.tar.gz |
avcodec/utils: check the private context class
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/utils.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c index db79b67e93..74bf6d5013 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -1680,6 +1680,10 @@ int attribute_align_arg avcodec_open2(AVCodecContext *avctx, const AVCodec *code avctx->time_base = av_inv_q(av_mul_q(avctx->framerate, (AVRational){avctx->ticks_per_frame, 1})); #endif } + if (codec->priv_data_size > 0 && avctx->priv_data && codec->priv_class) { + av_assert0(*(const AVClass **)avctx->priv_data == codec->priv_class); + } + end: ff_unlock_avcodec(); if (options) { |