diff mbox series

[FFmpeg-devel,2/2] fftools/ffmpeg_filter: simplify buffersrc arg printing

Message ID 20240110090547.69151-2-ffmpeg@haasn.xyz
State Accepted
Commit f7b1017d7378e44daa7971fa2bf79738964d2002
Headers show
Series [FFmpeg-devel,1/2] fftools/ffplay: add missing YUV metadata to buffersrc | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Niklas Haas Jan. 10, 2024, 9:05 a.m. UTC
From: Niklas Haas <git@haasn.dev>

There's no need to go through full string expansion here.
---
 fftools/ffmpeg_filter.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c
index 82ee4fae7d..f4324579c5 100644
--- a/fftools/ffmpeg_filter.c
+++ b/fftools/ffmpeg_filter.c
@@ -1497,11 +1497,10 @@  static int configure_input_video_filter(FilterGraph *fg, AVFilterGraph *graph,
     av_bprint_init(&args, 0, AV_BPRINT_SIZE_AUTOMATIC);
     av_bprintf(&args,
              "video_size=%dx%d:pix_fmt=%d:time_base=%d/%d:"
-             "pixel_aspect=%d/%d:colorspace=%s:range=%s",
+             "pixel_aspect=%d/%d:colorspace=%d:range=%d",
              ifp->width, ifp->height, ifp->format,
              ifp->time_base.num, ifp->time_base.den, sar.num, sar.den,
-             av_color_space_name(ifp->color_space),
-             av_color_range_name(ifp->color_range));
+             ifp->color_space, ifp->color_range);
     if (fr.num && fr.den)
         av_bprintf(&args, ":frame_rate=%d/%d", fr.num, fr.den);
     snprintf(name, sizeof(name), "graph %d input from stream %d:%d", fg->index,