aboutsummaryrefslogtreecommitdiffstats
path: root/avconv.c
diff options
context:
space:
mode:
authorLuca Barbato <lu_zero@gentoo.org>2014-05-31 15:49:30 +0200
committerLuca Barbato <lu_zero@gentoo.org>2014-06-04 13:04:40 +0200
commit39ec5e1cf8444f827c42effb76e5694e091bbff3 (patch)
tree26242e56df511fdec9c71a7d99318ba3316e7f76 /avconv.c
parent95b7fa1729b93bbb3f4fb85a5c0cb53cf970c3c7 (diff)
downloadffmpeg-39ec5e1cf8444f827c42effb76e5694e091bbff3.tar.gz
avconv: Report the codec and the encoder separately
Bug-Id: 694
Diffstat (limited to 'avconv.c')
-rw-r--r--avconv.c30
1 files changed, 26 insertions, 4 deletions
diff --git a/avconv.c b/avconv.c
index b167ff662f..d2b368004d 100644
--- a/avconv.c
+++ b/avconv.c
@@ -2081,10 +2081,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");
}