summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2020-12-23 12:34:14 +0100
committerPaul B Mahol <onemda@gmail.com>2020-12-25 13:28:39 +0100
commit676689cc7c060007854492dac717081211b270d5 (patch)
treeeb1ad554da405bb0af65fc98b7574670f7292c2b /libavcodec
parent29cef1bcd6baf4394a24b34bfbec59e97bb3875b (diff)
avcodec/cfhd: properly handle midstream size changes for transform type 2
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/cfhd.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libavcodec/cfhd.c b/libavcodec/cfhd.c
index a2b9c7c76a..17ddcdd2df 100644
--- a/libavcodec/cfhd.c
+++ b/libavcodec/cfhd.c
@@ -1372,6 +1372,12 @@ static int update_thread_context(AVCodecContext *dst, const AVCodecContext *src)
if (dst == src || psrc->transform_type == 0)
return 0;
+ if (pdst->plane[0].idwt_size != psrc->plane[0].idwt_size ||
+ pdst->a_format != psrc->a_format ||
+ pdst->a_width != psrc->a_width ||
+ pdst->a_height != psrc->a_height)
+ free_buffers(pdst);
+
pdst->a_format = psrc->a_format;
pdst->a_width = psrc->a_width;
pdst->a_height = psrc->a_height;