summaryrefslogtreecommitdiff
path: root/libavformat/cafdec.c
diff options
context:
space:
mode:
authorCarl Eugen Hoyos <cehoyos@ag.or.at>2011-07-24 23:52:42 +0200
committerCarl Eugen Hoyos <cehoyos@ag.or.at>2011-07-24 23:52:42 +0200
commit88084eecdfd163802a47501935408acbe07b1691 (patch)
treeadf849f1c64a3858108ed7e9d1048ae252f6435e /libavformat/cafdec.c
parent9e4ed295dab61fe0538a73ab88070e3af201f1e6 (diff)
Use little endian for caf codec tags.
Diffstat (limited to 'libavformat/cafdec.c')
-rw-r--r--libavformat/cafdec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/cafdec.c b/libavformat/cafdec.c
index da01598f13..8b0daddd58 100644
--- a/libavformat/cafdec.c
+++ b/libavformat/cafdec.c
@@ -68,7 +68,7 @@ static int read_desc_chunk(AVFormatContext *s)
/* parse format description */
st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
st->codec->sample_rate = av_int2dbl(avio_rb64(pb));
- st->codec->codec_tag = avio_rb32(pb);
+ st->codec->codec_tag = avio_rl32(pb);
flags = avio_rb32(pb);
caf->bytes_per_packet = avio_rb32(pb);
st->codec->block_align = caf->bytes_per_packet;
@@ -85,7 +85,7 @@ static int read_desc_chunk(AVFormatContext *s)
}
/* determine codec */
- if (st->codec->codec_tag == MKBETAG('l','p','c','m'))
+ if (st->codec->codec_tag == MKTAG('l','p','c','m'))
st->codec->codec_id = ff_mov_get_lpcm_codec_id(st->codec->bits_per_coded_sample, (flags ^ 0x2) | 0x4);
else
st->codec->codec_id = ff_codec_get_id(ff_codec_caf_tags, st->codec->codec_tag);