mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-04-08 16:54:03 +02:00
fftools/ffplay: add missing YUV metadata to buffersrc
This commit lets ffplay properly propagate YUV metadata into the filter graph, avoiding such issues as e.g. accidentally passing YCgCo into a filter that can't support it. Also fixes an error related to this missing metadata from buffersrc (since commit 2d555dc82d) See-Also: https://trac.ffmpeg.org/ticket/10839
This commit is contained in:
parent
b181868aba
commit
dcc7263b0e
@ -1894,10 +1894,12 @@ static int configure_video_filters(AVFilterGraph *graph, VideoState *is, const c
|
||||
graph->scale_sws_opts = av_strdup(sws_flags_str);
|
||||
|
||||
snprintf(buffersrc_args, sizeof(buffersrc_args),
|
||||
"video_size=%dx%d:pix_fmt=%d:time_base=%d/%d:pixel_aspect=%d/%d",
|
||||
"video_size=%dx%d:pix_fmt=%d:time_base=%d/%d:pixel_aspect=%d/%d:"
|
||||
"colorspace=%d:range=%d",
|
||||
frame->width, frame->height, frame->format,
|
||||
is->video_st->time_base.num, is->video_st->time_base.den,
|
||||
codecpar->sample_aspect_ratio.num, FFMAX(codecpar->sample_aspect_ratio.den, 1));
|
||||
codecpar->sample_aspect_ratio.num, FFMAX(codecpar->sample_aspect_ratio.den, 1),
|
||||
frame->colorspace, frame->color_range);
|
||||
if (fr.num && fr.den)
|
||||
av_strlcatf(buffersrc_args, sizeof(buffersrc_args), ":frame_rate=%d/%d", fr.num, fr.den);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user