aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/utils.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-04-18 22:08:28 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-04-18 22:08:28 +0200
commite366e6bfab5c13970be2855d1031cb32aafa649e (patch)
tree653d562af5604539fcca7a3b34d09188c1759e0b /libavcodec/utils.c
parenta02f8ef1d2f4cd267224c9bc3b5e841d7fc943cc (diff)
parent0f53601ac6b88196e2cae07a4c3aad6810413261 (diff)
downloadffmpeg-e366e6bfab5c13970be2855d1031cb32aafa649e.tar.gz
Merge remote-tracking branch 'qatar/master'
* qatar/master: ppc: drop unused function dct_quantize_altivec() mpegaudiodec: Do not discard mp_decode_frame() return value. matroska: do not set invalid default duration if frame rate is zero mkv: use av_reduce instead of av_d2q for framerate estimation mkv: report average framerate as minimal as well avcodec_string: Favor AVCodecContext.codec over the default codec. cook: Make constants passed to AV_BE2NE32C() unsigned to avoid signed overflow. Conflicts: libavcodec/cook.c libavcodec/ppc/mpegvideo_altivec.c libavcodec/utils.c libavformat/matroskadec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/utils.c')
-rw-r--r--libavcodec/utils.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index c6e401268b..31649ca0b8 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -1757,8 +1757,11 @@ void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode)
codec_type = av_get_media_type_string(enc->codec_type);
codec_name = avcodec_get_name(enc->codec_id);
if (enc->profile != FF_PROFILE_UNKNOWN) {
- p = encode ? avcodec_find_encoder(enc->codec_id) :
- avcodec_find_decoder(enc->codec_id);
+ if (enc->codec)
+ p = enc->codec;
+ else
+ p = encode ? avcodec_find_encoder(enc->codec_id) :
+ avcodec_find_decoder(enc->codec_id);
if (p)
profile = av_get_profile_name(p, enc->profile);
}