[FFmpeg-cvslog] avcodec: disallow reget_buffer() if pix_fmt changed.
Ronald S. Bultje
git at videolan.org
Sun Feb 26 05:21:43 CET 2012
ffmpeg | branch: master | Ronald S. Bultje <rsbultje at gmail.com> | Fri Feb 17 14:48:57 2012 -0800| [87840eeb7115a8949ab589a82f24bc25ee647b78] | committer: Ronald S. Bultje
avcodec: disallow reget_buffer() if pix_fmt changed.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=87840eeb7115a8949ab589a82f24bc25ee647b78
---
libavcodec/utils.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 67c9e36..285be9b 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;
More information about the ffmpeg-cvslog
mailing list