Merge commit '70762508ec5919474edb92a5b1f266fd06640f9c'

* commit '70762508ec5919474edb92a5b1f266fd06640f9c':
  lavc: Prettify printing of codec tags containing non alphanumeric characters
  h264: Rename the jpeg_420 pixfmt list to match the common naming structure

Conflicts:
	libavcodec/h264.c
	libavcodec/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2013-03-07 11:29:11 +01:00
commit 47f1af47b6
1 changed files with 2 additions and 2 deletions

View File

@ -2161,14 +2161,14 @@ size_t av_get_codec_tag_string(char *buf, size_t buf_size, unsigned int codec_ta
{
int i, len, ret = 0;
#define IS_PRINT(x) \
#define TAG_PRINT(x) \
(((x) >= '0' && (x) <= '9') || \
((x) >= 'a' && (x) <= 'z') || ((x) >= 'A' && (x) <= 'Z') || \
((x) == '.' || (x) == ' ' || (x) == '-' || (x) == '_'))
for (i = 0; i < 4; i++) {
len = snprintf(buf, buf_size,
IS_PRINT(codec_tag&0xFF) ? "%c" : "[%d]", codec_tag&0xFF);
TAG_PRINT(codec_tag & 0xFF) ? "%c" : "[%d]", codec_tag & 0xFF);
buf += len;
buf_size = buf_size > len ? buf_size - len : 0;
ret += len;