Message ID | 20240718015856.5276-1-jamrial@gmail.com |
---|---|
State | New |
Headers | show |
Series | [FFmpeg-devel,1/2] avformat/mov: don't export frame cropping stream side data when the clap box is a no-op | expand |
Context | Check | Description |
---|---|---|
andriy/make_x86 | success | Make finished |
andriy/make_fate_x86 | success | Make fate finished |
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;
Signed-off-by: James Almer <jamrial@gmail.com> --- libavformat/mov.c | 3 +++ 1 file changed, 3 insertions(+)