Commit 6614214e authored by Derek Buitenhuis's avatar Derek Buitenhuis

Merge commit '168a443d'

* commit '168a443d':
  avprobe: print information from the codec descriptor
Merged-by: 's avatarDerek Buitenhuis <derek.buitenhuis@gmail.com>
parents 80195236 168a443d
......@@ -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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment