[FFmpeg-devel] [PATCH] avf_showspectrum: Silence "deprecated pixel format" warning
Paul B Mahol
onemda at gmail.com
Sat Jan 9 22:23:43 CET 2016
On 1/9/16, Timothy Gu <timothygu99 at gmail.com> wrote:
> ---
> libavfilter/avf_showspectrum.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/libavfilter/avf_showspectrum.c b/libavfilter/avf_showspectrum.c
> index 5b26be8..a967a41 100644
> --- a/libavfilter/avf_showspectrum.c
> +++ b/libavfilter/avf_showspectrum.c
> @@ -240,7 +240,7 @@ static int query_formats(AVFilterContext *ctx)
> AVFilterLink *inlink = ctx->inputs[0];
> AVFilterLink *outlink = ctx->outputs[0];
> static const enum AVSampleFormat sample_fmts[] = { AV_SAMPLE_FMT_FLTP,
> AV_SAMPLE_FMT_NONE };
> - static const enum AVPixelFormat pix_fmts[] = { AV_PIX_FMT_YUVJ444P,
> AV_PIX_FMT_NONE };
> + static const enum AVPixelFormat pix_fmts[] = { AV_PIX_FMT_YUV444P,
> AV_PIX_FMT_YUVJ444P, AV_PIX_FMT_NONE };
> int ret;
>
> /* set input audio formats */
> @@ -365,6 +365,7 @@ static int config_output(AVFilterLink *outlink)
> if (!outpicref)
> return AVERROR(ENOMEM);
> outlink->sample_aspect_ratio = (AVRational){1,1};
> + outpicref->color_range = AVCOL_RANGE_JPEG;
> for (i = 0; i < outlink->h; i++) {
> memset(outpicref->data[0] + i * outpicref->linesize[0], 0,
> outlink->w);
> memset(outpicref->data[1] + i * outpicref->linesize[1], 128,
> outlink->w);
> --
> 2.1.4
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
I already set color range.
More information about the ffmpeg-devel
mailing list