[FFmpeg-cvslog] fftools/ffmpeg_demux: don't insert the crop filter if frame cropping side data defines no cropping

James Almer git at videolan.org
Thu Jul 18 15:50:51 EEST 2024


ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Wed Jul 17 23:01:48 2024 -0300| [90672974bd4eaed658f538563a8f216c52d1e996] | committer: James Almer

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

Signed-off-by: James Almer <jamrial at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=90672974bd4eaed658f538563a8f216c52d1e996
---

 fftools/ffmpeg_demux.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fftools/ffmpeg_demux.c b/fftools/ffmpeg_demux.c
index 528e02149f..6f7d78c896 100644
--- a/fftools/ffmpeg_demux.c
+++ b/fftools/ffmpeg_demux.c
@@ -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) {



More information about the ffmpeg-cvslog mailing list