diff options
author | Alex Converse <alex.converse@gmail.com> | 2012-04-17 11:32:56 -0700 |
---|---|---|
committer | Alex Converse <alex.converse@gmail.com> | 2012-04-17 14:51:23 -0700 |
commit | df8d5eaa14ab584695d190b15aeec210b60913c5 (patch) | |
tree | 33b07faf4ed2a1cbf1980d46e4fca30bf0389db0 /libavcodec/utils.c | |
parent | b5d2bf964be338bf8e86a01619646332729b434e (diff) | |
download | ffmpeg-df8d5eaa14ab584695d190b15aeec210b60913c5.tar.gz |
avcodec_string: Favor AVCodecContext.codec over the default codec.
This improves output for formats with more than one AVCodec.
Diffstat (limited to 'libavcodec/utils.c')
-rw-r--r-- | libavcodec/utils.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 58b7865fa4..7caf93f65d 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -1498,7 +1498,9 @@ void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode) int bitrate; AVRational display_aspect_ratio; - if (encode) + if (enc->codec) + p = enc->codec; + else if (encode) p = avcodec_find_encoder(enc->codec_id); else p = avcodec_find_decoder(enc->codec_id); |