[FFmpeg-devel] [PATCH 08/25] fftools/ffplay: support only limited color range
wm4
nfxjfg at googlemail.com
Sun Dec 17 14:55:42 EET 2017
On Sat, 16 Dec 2017 11:12:28 +0100
Paul B Mahol <onemda at gmail.com> wrote:
> Signed-off-by: Paul B Mahol <onemda at gmail.com>
> ---
> fftools/ffplay.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/fftools/ffplay.c b/fftools/ffplay.c
> index 10a917194d..f023c81575 100644
> --- a/fftools/ffplay.c
> +++ b/fftools/ffplay.c
> @@ -1822,6 +1822,7 @@ fail:
> static int configure_video_filters(AVFilterGraph *graph, VideoState *is, const char *vfilters, AVFrame *frame)
> {
> enum AVPixelFormat pix_fmts[FF_ARRAY_ELEMS(sdl_texture_format_map)];
> + enum AVColorRange color_ranges[2] = { AVCOL_RANGE_MPEG, AVCOL_RANGE_UNSPECIFIED };
> char sws_flags_str[512] = "";
> char buffersrc_args[256];
> int ret;
> @@ -1876,7 +1877,10 @@ static int configure_video_filters(AVFilterGraph *graph, VideoState *is, const c
> if ((ret = av_opt_set_int_list(filt_out, "pix_fmts", pix_fmts, AV_PIX_FMT_NONE, AV_OPT_SEARCH_CHILDREN)) < 0)
> goto fail;
>
> - last_filter = filt_out;
> + if ((ret = av_opt_set_int_list(filt_out, "color_ranges", color_ranges, AVCOL_RANGE_UNSPECIFIED, AV_OPT_SEARCH_CHILDREN)) < 0)
> + goto fail;
> +
> + last_filter = filt_out;
>
> /* Note: this macro adds a filter before the lastly added filter, so the
> * processing order of the filters is in reverse */
LGTM
More information about the ffmpeg-devel
mailing list