[FFmpeg-devel] [PATCH 1/2] avformat/mov: don't export frame cropping stream side data when the clap box is a no-op
James Almer
jamrial at gmail.com
Thu Jul 18 04:58:55 EEST 2024
Signed-off-by: James Almer <jamrial at gmail.com>
---
libavformat/mov.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/libavformat/mov.c b/libavformat/mov.c
index ce95842ce5..20efc74f00 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -1262,6 +1262,9 @@ static int mov_read_clap(MOVContext *c, AVIOContext *pb, MOVAtom atom)
bottom = st->codecpar->height - 1 - bottom;
right = st->codecpar->width - 1 - right;
+ if (!(left | right | top | bottom))
+ return 0;
+
if ((left + right) >= st->codecpar->width ||
(top + bottom) >= st->codecpar->height)
return AVERROR_INVALIDDATA;
--
2.45.2
More information about the ffmpeg-devel
mailing list