summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas George <george@nsup.org>2014-04-17 00:22:14 +0200
committerNicolas George <george@nsup.org>2014-04-29 13:25:59 +0200
commit43ca94a6337389d82099f68a31bc19cde61d176d (patch)
treee682c5a18c379bfeda2c09885b47ba2fd4b6ce86
parentc9212abf95be62a164e7945fd50f8071382dcae3 (diff)
downloadffmpeg-streaming-43ca94a6337389d82099f68a31bc19cde61d176d.zip
ffmpeg-streaming-43ca94a6337389d82099f68a31bc19cde61d176d.tar.gz
ffprobe: use the codec descriptor if no decoder was found.
-rw-r--r--ffprobe.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/ffprobe.c b/ffprobe.c
index 319bbc6..c6e0469 100644
--- a/ffprobe.c
+++ b/ffprobe.c
@@ -1976,6 +1976,7 @@ static int show_stream(WriterContext *w, AVFormatContext *fmt_ctx, int stream_id
const char *s;
AVRational sar, dar;
AVBPrint pbuf;
+ const AVCodecDescriptor *cd;
int ret = 0;
av_bprint_init(&pbuf, 1, AV_BPRINT_SIZE_UNLIMITED);
@@ -1993,6 +1994,12 @@ static int show_stream(WriterContext *w, AVFormatContext *fmt_ctx, int stream_id
if (dec->long_name) print_str ("codec_long_name", dec->long_name);
else print_str_opt("codec_long_name", "unknown");
}
+ } else if ((cd = avcodec_descriptor_get(stream->codec->codec_id))) {
+ print_str_opt("codec_name", cd->name);
+ if (!do_bitexact) {
+ print_str_opt("codec_long_name",
+ cd->long_name ? cd->long_name : "unknown");
+ }
} else {
print_str_opt("codec_name", "unknown");
if (!do_bitexact) {
OpenPOWER on IntegriCloud