From 87840eeb7115a8949ab589a82f24bc25ee647b78 Mon Sep 17 00:00:00 2001 From: "Ronald S. Bultje" Date: Fri, 17 Feb 2012 14:48:57 -0800 Subject: avcodec: disallow reget_buffer() if pix_fmt changed. --- libavcodec/utils.c | 2 ++ 1 file changed, 2 insertions(+) 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; -- cgit v1.2.3