[FFmpeg-cvslog] avcodec/cfhd: properly handle midstream size changes for transform type 2
Paul B Mahol
git at videolan.org
Fri Dec 25 14:29:20 EET 2020
ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Wed Dec 23 12:34:14 2020 +0100| [676689cc7c060007854492dac717081211b270d5] | committer: Paul B Mahol
avcodec/cfhd: properly handle midstream size changes for transform type 2
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=676689cc7c060007854492dac717081211b270d5
---
libavcodec/cfhd.c | 6 ++++++
1 file changed, 6 insertions(+)
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;
More information about the ffmpeg-cvslog
mailing list