mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-28 02:12:28 +00:00
utils: check that parameters havnt changed in reget_buffer()
Fixes Ticket902 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
2422e8271c
commit
44e191457a
@ -557,6 +557,11 @@ int avcodec_default_reget_buffer(AVCodecContext *s, AVFrame *pic){
|
||||
|
||||
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(pic->data[0] == NULL) {
|
||||
/* We will copy from buffer, so must be readable */
|
||||
|
Loading…
Reference in New Issue
Block a user