[FFmpeg-cvslog] avcodec_string: Favor AVCodecContext.codec over the default codec.
Alex Converse
git at videolan.org
Wed Apr 18 22:28:25 CEST 2012
ffmpeg | branch: master | Alex Converse <alex.converse at gmail.com> | Tue Apr 17 11:32:56 2012 -0700| [df8d5eaa14ab584695d190b15aeec210b60913c5] | committer: Alex Converse
avcodec_string: Favor AVCodecContext.codec over the default codec.
This improves output for formats with more than one AVCodec.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=df8d5eaa14ab584695d190b15aeec210b60913c5
---
libavcodec/utils.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 58b7865..7caf93f 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);
More information about the ffmpeg-cvslog
mailing list