Commit df8d5eaa authored by Alex Converse's avatar Alex Converse

avcodec_string: Favor AVCodecContext.codec over the default codec.

This improves output for formats with more than one AVCodec.
parent b5d2bf96
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment