]> git.sesse.net Git - ffmpeg/commitdiff
avcodec: disallow reget_buffer() if pix_fmt changed.
authorRonald S. Bultje <rsbultje@gmail.com>
Fri, 17 Feb 2012 22:48:57 +0000 (14:48 -0800)
committerRonald S. Bultje <rsbultje@gmail.com>
Fri, 24 Feb 2012 22:28:15 +0000 (14:28 -0800)
libavcodec/utils.c

index 67c9e36bbaeff7e60d12ee5b427ca1c137debe0c..285be9b72bb2567fa5d7ec135f2c89d6c30150e7 100644 (file)
@@ -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;