Commit 44e19145 authored by Michael Niedermayer's avatar Michael Niedermayer

utils: check that parameters havnt changed in reget_buffer()

Fixes Ticket902
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 2422e827
...@@ -557,6 +557,11 @@ int avcodec_default_reget_buffer(AVCodecContext *s, AVFrame *pic){ ...@@ -557,6 +557,11 @@ int avcodec_default_reget_buffer(AVCodecContext *s, AVFrame *pic){
assert(s->codec_type == AVMEDIA_TYPE_VIDEO); assert(s->codec_type == AVMEDIA_TYPE_VIDEO);
if (pic->data[0] && (pic->width != s->width || pic->height != s->height || pic->format != s->pix_fmt)) {
av_log(s, AV_LOG_WARNING, "Width/height/fmt changing with reget buffer");
s->release_buffer(s, pic);
}
/* If no picture return a new buffer */ /* If no picture return a new buffer */
if(pic->data[0] == NULL) { if(pic->data[0] == NULL) {
/* We will copy from buffer, so must be readable */ /* We will copy from buffer, so must be readable */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment