[FFmpeg-devel] [PATCH v6 2/2] ffmpeg: Deprecate display rotation override with a metadata key

Anton Khirnov anton at khirnov.net
Tue Oct 4 11:52:19 EEST 2022


Quoting Thilo Borgmann (2022-09-26 07:57:53)
> diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c
> index f07858333d..3f2409ee28 100644
> --- a/fftools/ffmpeg_opt.c
> +++ b/fftools/ffmpeg_opt.c
> @@ -2859,16 +2859,26 @@ static void of_add_metadata(AVFormatContext *oc, const OptionsContext *o)
>              for (int j = 0; j < oc->nb_streams; j++) {
>                  OutputStream *ost = output_streams[nb_output_streams - oc->nb_streams + j];
>                  if ((ret = check_stream_specifier(oc, oc->streams[j], stream_spec)) > 0) {
> +#if FFMPEG_ROTATION_METADATA
>                      if (!strcmp(o->metadata[i].u.str, "rotate")) {
>                          char *tail;
>                          double theta = av_strtod(val, &tail);
>                          if (!*tail) {
>                              ost->rotate_overridden = 1;
>                              ost->rotate_override_value = theta;
> +
> +                        av_log(NULL, AV_LOG_WARNING,
> +                               "Conversion of a 'rotate' metadata key to a "
> +                               "proper display matrix rotation is deprecated. "

Also, the user has no idea what a "proper display matrix rotation" is.
Make it something like
"Using 'rotate' metadata to specify rotation is deprecated.

> +                               "See -display_rotation for setting rotation "
> +                               "instead.");

Missing newline.

-- 
Anton Khirnov


More information about the ffmpeg-devel mailing list