diff options
author | James Almer <jamrial@gmail.com> | 2024-02-10 14:39:41 -0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2024-02-13 20:32:48 -0300 |
commit | eb5b4e60c9c2ad701c99f5ab2c606a66b3119341 (patch) | |
tree | 0e1dae1ee9f40d0b1b99655414ce28c2e1400e0d /libavcodec/avcodec.c | |
parent | 6106fb2b4c5ebd88a75fadfbbe7cf7e7fb944d18 (diff) | |
download | ffmpeg-eb5b4e60c9c2ad701c99f5ab2c606a66b3119341.tar.gz |
avcodec/avcodec: don't print coded dimensions if not set
The avctx passed to avcodec_string() may have unset coded dimensions, as is the
case when called by av_dump_format() where the streams had all the needed
information at the container level, and as such no frames were decoded
internally.
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/avcodec.c')
-rw-r--r-- | libavcodec/avcodec.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/avcodec.c b/libavcodec/avcodec.c index b6d27ada21..a13b781996 100644 --- a/libavcodec/avcodec.c +++ b/libavcodec/avcodec.c @@ -625,6 +625,7 @@ void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode) enc->width, enc->height); if (av_log_get_level() >= AV_LOG_VERBOSE && + enc->coded_width && enc->coded_height && (enc->width != enc->coded_width || enc->height != enc->coded_height)) av_bprintf(&bprint, " (%dx%d)", |