[FFmpeg-devel] [PATCH 5/5] fftools/ffmpeg: support applying container level cropping
Anton Khirnov
anton at khirnov.net
Thu Jul 20 22:08:23 EEST 2023
Quoting James Almer (2023-07-20 00:20:43)
> diff --git a/fftools/ffmpeg_enc.c b/fftools/ffmpeg_enc.c
> index 8b750de4e5..3cf29c8b2c 100644
> --- a/fftools/ffmpeg_enc.c
> +++ b/fftools/ffmpeg_enc.c
> @@ -441,14 +441,16 @@ int enc_open(OutputStream *ost, AVFrame *frame)
> int i;
> for (i = 0; i < ist->st->nb_side_data; i++) {
> AVPacketSideData *sd = &ist->st->side_data[i];
> - if (sd->type != AV_PKT_DATA_CPB_PROPERTIES) {
> + if (sd->type == AV_PKT_DATA_CPB_PROPERTIES)
> + continue;
> + if (ist->apply_cropping && sd->type == AV_PKT_DATA_FRAME_CROPPING)
> + continue;
I'm very much not a fan of the encoder doing anything based on decoder
options.
I know the code below already does the same thing, but I'd like to get
rid of it rather than add to it.
--
Anton Khirnov
More information about the ffmpeg-devel
mailing list