summaryrefslogtreecommitdiff
path: root/avprobe.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2012-10-06 13:29:37 +0200
committerAnton Khirnov <anton@khirnov.net>2012-10-12 12:45:38 +0200
commitb7f1010c8fce09096057528f7cd29589ea1ae7df (patch)
tree0fcf97509bb39cc3fd1abe21f55b86791d16fca0 /avprobe.c
parentd2fcb356caf38c12b0fc9d8c5bac592a28b0f0f1 (diff)
downloadffmpeg-b7f1010c8fce09096057528f7cd29589ea1ae7df.tar.gz
tools: do not use av_pix_fmt_descriptors directly.
Diffstat (limited to 'avprobe.c')
-rw-r--r--avprobe.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/avprobe.c b/avprobe.c
index 16a5d29ebb..3a3ae0fa7d 100644
--- a/avprobe.c
+++ b/avprobe.c
@@ -584,6 +584,7 @@ static void show_stream(AVFormatContext *fmt_ctx, int stream_idx)
const char *profile;
char val_str[128];
AVRational display_aspect_ratio;
+ const AVPixFmtDescriptor *desc;
probe_object_header("stream");
@@ -629,9 +630,8 @@ static void show_stream(AVFormatContext *fmt_ctx, int stream_idx)
rational_string(val_str, sizeof(val_str), ":",
&display_aspect_ratio));
}
- probe_str("pix_fmt",
- dec_ctx->pix_fmt != AV_PIX_FMT_NONE ?
- av_pix_fmt_descriptors[dec_ctx->pix_fmt].name : "unknown");
+ desc = av_pix_fmt_desc_get(dec_ctx->pix_fmt);
+ probe_str("pix_fmt", desc ? desc->name : "unknown");
probe_int("level", dec_ctx->level);
break;