Commit 71b19129 authored by Carl Eugen Hoyos's avatar Carl Eugen Hoyos

Print bpc (for bits per component) with pixel format if it is smaller than expected.

parent 8e905655
...@@ -2059,6 +2059,10 @@ void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode) ...@@ -2059,6 +2059,10 @@ void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode)
snprintf(buf + strlen(buf), buf_size - strlen(buf), snprintf(buf + strlen(buf), buf_size - strlen(buf),
", %s", ", %s",
av_get_pix_fmt_name(enc->pix_fmt)); av_get_pix_fmt_name(enc->pix_fmt));
if (enc->bits_per_raw_sample &&
enc->bits_per_raw_sample <= av_pix_fmt_desc_get(enc->pix_fmt)->comp[0].depth_minus1)
snprintf(buf + strlen(buf), buf_size - strlen(buf),
" (%d bpc)", enc->bits_per_raw_sample);
} }
if (enc->width) { if (enc->width) {
snprintf(buf + strlen(buf), buf_size - strlen(buf), snprintf(buf + strlen(buf), buf_size - strlen(buf),
......
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