diff options
author | Derek Buitenhuis <derek.buitenhuis@gmail.com> | 2016-04-11 16:01:10 +0100 |
---|---|---|
committer | Derek Buitenhuis <derek.buitenhuis@gmail.com> | 2016-04-11 16:01:22 +0100 |
commit | 6614214ece70f1d41d085d822ed02941601d6868 (patch) | |
tree | f083b42c22425cb5ed7cc7f2900a54665d871d25 | |
parent | 80195236c85d4bf8cd761bab8bc7b46dc33acb07 (diff) | |
parent | 168a443d43b10ef6a3545d64b2f8bc90144ce4b7 (diff) | |
download | ffmpeg-6614214ece70f1d41d085d822ed02941601d6868.tar.gz |
Merge commit '168a443d43b10ef6a3545d64b2f8bc90144ce4b7'
* commit '168a443d43b10ef6a3545d64b2f8bc90144ce4b7':
avprobe: print information from the codec descriptor
Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
-rw-r--r-- | ffprobe.c | 18 |
1 files changed, 5 insertions, 13 deletions
@@ -2128,7 +2128,6 @@ static int show_stream(WriterContext *w, AVFormatContext *fmt_ctx, int stream_id { AVStream *stream = fmt_ctx->streams[stream_idx]; AVCodecContext *dec_ctx; - const AVCodec *dec; char val_str[128]; const char *s; AVRational sar, dar; @@ -2144,18 +2143,11 @@ static int show_stream(WriterContext *w, AVFormatContext *fmt_ctx, int stream_id print_int("index", stream->index); dec_ctx = stream->codec; - dec = dec_ctx->codec; - if (dec) { - print_str("codec_name", dec->name); + if (cd = avcodec_descriptor_get(stream->codec->codec_id)) { + print_str("codec_name", cd->name); if (!do_bitexact) { - 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"); + print_str("codec_long_name", + cd->long_name ? cd->long_name : "unknown"); } } else { print_str_opt("codec_name", "unknown"); @@ -2164,7 +2156,7 @@ static int show_stream(WriterContext *w, AVFormatContext *fmt_ctx, int stream_id } } - if (!do_bitexact && dec && (profile = av_get_profile_name(dec, dec_ctx->profile))) + if (!do_bitexact && (profile = avcodec_profile_name(dec_ctx->codec_id, dec_ctx->profile))) print_str("profile", profile); else { if (dec_ctx->profile != FF_PROFILE_UNKNOWN) { |