fftools/ffmpeg_demux: don't insert the crop filter if frame cropping side data defines no cropping

Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
James Almer 2024-07-17 23:01:48 -03:00
parent fa5a605542
commit 90672974bd
1 changed files with 2 additions and 1 deletions

View File

@ -1014,7 +1014,8 @@ int ist_filter_add(InputStream *ist, InputFilter *ifilter, int is_simple,
opts->crop_bottom = AV_RL32(sd->data + 4);
opts->crop_left = AV_RL32(sd->data + 8);
opts->crop_right = AV_RL32(sd->data + 12);
if (ds->apply_cropping && ds->apply_cropping != CROP_CODEC)
if (ds->apply_cropping && ds->apply_cropping != CROP_CODEC &&
(opts->crop_top | opts->crop_bottom | opts->crop_left | opts->crop_right))
opts->flags |= IFILTER_FLAG_CROP;
}
} else if (ist->par->codec_type == AVMEDIA_TYPE_SUBTITLE) {