avcodec_string: Favor AVCodecContext.codec over the default codec.

This improves output for formats with more than one AVCodec.
pull/5/head
Alex Converse 13 years ago
parent b5d2bf964b
commit df8d5eaa14
  1. 4
      libavcodec/utils.c

@ -1498,7 +1498,9 @@ void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode)
int bitrate; int bitrate;
AVRational display_aspect_ratio; AVRational display_aspect_ratio;
if (encode) if (enc->codec)
p = enc->codec;
else if (encode)
p = avcodec_find_encoder(enc->codec_id); p = avcodec_find_encoder(enc->codec_id);
else else
p = avcodec_find_decoder(enc->codec_id); p = avcodec_find_decoder(enc->codec_id);

Loading…
Cancel
Save