[FFmpeg-cvslog] avcodec/utils: check the private context class

Michael Niedermayer git at videolan.org
Wed Dec 17 05:23:44 CET 2014


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Dec 17 03:28:25 2014 +0100| [ddd7dac7ae0515ea6036396bb50d7bb5f702aeef] | committer: Michael Niedermayer

avcodec/utils: check the private context class

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ddd7dac7ae0515ea6036396bb50d7bb5f702aeef
---

 libavcodec/utils.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index db79b67..74bf6d5 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) {



More information about the ffmpeg-cvslog mailing list