diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-06-04 22:07:59 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-06-04 22:08:22 +0400 |
commit | 0efe3be71d94a094b2de6ae151309ab875a5463e (patch) | |
tree | aab64eb23632de4b1477a47c3fd74fa4bb91db97 | |
parent | d76f0c0378dfd86883df28d32fdbc9071e2606ff (diff) | |
parent | 39ec5e1cf8444f827c42effb76e5694e091bbff3 (diff) |
Merge commit '39ec5e1cf8444f827c42effb76e5694e091bbff3'
* commit '39ec5e1cf8444f827c42effb76e5694e091bbff3':
avconv: Report the codec and the encoder separately
Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | ffmpeg.c | 30 |
1 files changed, 26 insertions, 4 deletions
@@ -2950,10 +2950,32 @@ static int transcode_init(void) ost->sync_ist->st->index); if (ost->stream_copy) av_log(NULL, AV_LOG_INFO, " (copy)"); - else - av_log(NULL, AV_LOG_INFO, " (%s -> %s)", input_streams[ost->source_index]->dec ? - input_streams[ost->source_index]->dec->name : "?", - ost->enc ? ost->enc->name : "?"); + else { + const AVCodec *in_codec = input_streams[ost->source_index]->dec; + const AVCodec *out_codec = ost->enc; + const char *decoder_name = "?"; + const char *in_codec_name = "?"; + const char *encoder_name = "?"; + const char *out_codec_name = "?"; + + if (in_codec) { + decoder_name = in_codec->name; + in_codec_name = avcodec_descriptor_get(in_codec->id)->name; + if (!strcmp(decoder_name, in_codec_name)) + decoder_name = "native"; + } + + if (out_codec) { + encoder_name = out_codec->name; + out_codec_name = avcodec_descriptor_get(out_codec->id)->name; + if (!strcmp(encoder_name, in_codec_name)) + encoder_name = "native"; + } + + av_log(NULL, AV_LOG_INFO, " (%s (%s) -> %s (%s))", + in_codec_name, decoder_name, + out_codec_name, encoder_name); + } av_log(NULL, AV_LOG_INFO, "\n"); } |