aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/utils.c
diff options
context:
space:
mode:
authorRonald S. Bultje <rsbultje@gmail.com>2012-02-17 14:48:57 -0800
committerRonald S. Bultje <rsbultje@gmail.com>2012-02-24 14:28:15 -0800
commit87840eeb7115a8949ab589a82f24bc25ee647b78 (patch)
tree4e7ccb568d4b2def4a6d291c9c5126ee0bcfd8f0 /libavcodec/utils.c
parent33cd32b389864f2437c94e6fd7dc109ff5f0ed06 (diff)
downloadffmpeg-87840eeb7115a8949ab589a82f24bc25ee647b78.tar.gz
avcodec: disallow reget_buffer() if pix_fmt changed.
Diffstat (limited to 'libavcodec/utils.c')
-rw-r--r--libavcodec/utils.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 67c9e36bba..285be9b72b 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -553,6 +553,8 @@ int avcodec_default_reget_buffer(AVCodecContext *s, AVFrame *pic){
return s->get_buffer(s, pic);
}
+ assert(s->pix_fmt == pic->pix_fmt);
+
/* If internal buffer type return the same buffer */
if(pic->type == FF_BUFFER_TYPE_INTERNAL) {
if(s->pkt) pic->pkt_pts= s->pkt->pts;