avformat/mov: don't export frame cropping stream side data when the clap box is a no-op

Signed-off-by: James Almer <jamrial@gmail.com>
release/7.1
James Almer 4 months ago
parent 2ff7d10c30
commit 3de65f47e0
  1. 3
      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;

Loading…
Cancel
Save