You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
kgv1: release reference picture on size change.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org
This commit is contained in:
@@ -61,8 +61,11 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac
|
|||||||
if (av_image_check_size(w, h, 0, avctx))
|
if (av_image_check_size(w, h, 0, avctx))
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if (w != avctx->width || h != avctx->height)
|
if (w != avctx->width || h != avctx->height) {
|
||||||
|
if (c->prev.data[0])
|
||||||
|
avctx->release_buffer(avctx, &c->prev);
|
||||||
avcodec_set_dimensions(avctx, w, h);
|
avcodec_set_dimensions(avctx, w, h);
|
||||||
|
}
|
||||||
|
|
||||||
maxcnt = w * h;
|
maxcnt = w * h;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user