You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
lavc: print the name of the codec, not its implementation, in avcodec_string
This commit is contained in:
@@ -1754,6 +1754,7 @@ void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode)
|
|||||||
int bitrate;
|
int bitrate;
|
||||||
int new_line = 0;
|
int new_line = 0;
|
||||||
AVRational display_aspect_ratio;
|
AVRational display_aspect_ratio;
|
||||||
|
const AVCodecDescriptor *desc = avcodec_descriptor_get(enc->codec_id);
|
||||||
|
|
||||||
if (enc->codec)
|
if (enc->codec)
|
||||||
p = enc->codec;
|
p = enc->codec;
|
||||||
@@ -1762,9 +1763,11 @@ void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode)
|
|||||||
else
|
else
|
||||||
p = avcodec_find_decoder(enc->codec_id);
|
p = avcodec_find_decoder(enc->codec_id);
|
||||||
|
|
||||||
if (p) {
|
if (p)
|
||||||
codec_name = p->name;
|
|
||||||
profile = av_get_profile_name(p, enc->profile);
|
profile = av_get_profile_name(p, enc->profile);
|
||||||
|
|
||||||
|
if (desc) {
|
||||||
|
codec_name = desc->name;
|
||||||
} else if (enc->codec_id == AV_CODEC_ID_MPEG2TS) {
|
} else if (enc->codec_id == AV_CODEC_ID_MPEG2TS) {
|
||||||
/* fake mpeg2 transport stream codec (currently not
|
/* fake mpeg2 transport stream codec (currently not
|
||||||
* registered) */
|
* registered) */
|
||||||
|
Reference in New Issue
Block a user