summaryrefslogtreecommitdiff
path: root/ffprobe.c
diff options
context:
space:
mode:
authorVittorio Giovara <vittorio.giovara@gmail.com>2017-06-01 15:18:37 -0400
committerVittorio Giovara <vittorio.giovara@gmail.com>2017-06-05 12:18:27 -0400
commit2ef9fc997dba90c9af4702971300b60bf0c41ac6 (patch)
treecb4fe895d80bdb89f71a802f753b00506cc36dca /ffprobe.c
parent7fc1be9a01c504fb20977bb3de334a915c924244 (diff)
ffprobe: Use pixdesc API to provide color space names
This API is more up-to-date, provides names compatible with filters and external encoders, and is consistent with the other color property variables. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Diffstat (limited to 'ffprobe.c')
-rw-r--r--ffprobe.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/ffprobe.c b/ffprobe.c
index b3464aac8f..e295c53def 100644
--- a/ffprobe.c
+++ b/ffprobe.c
@@ -2474,9 +2474,10 @@ static int show_stream(WriterContext *w, AVFormatContext *fmt_ctx, int stream_id
else
print_str_opt("color_range", "N/A");
- s = av_get_colorspace_name(par->color_space);
- if (s) print_str ("color_space", s);
- else print_str_opt("color_space", "unknown");
+ if (par->color_space != AVCOL_SPC_UNSPECIFIED)
+ print_str("color_space", av_color_space_name(par->color_space));
+ else
+ print_str_opt("color_space", av_color_space_name(par->color_space));
if (par->color_trc != AVCOL_TRC_UNSPECIFIED)
print_str("color_transfer", av_color_transfer_name(par->color_trc));