diff options
author | Ronald S. Bultje <rsbultje@gmail.com> | 2010-03-17 15:14:18 +0000 |
---|---|---|
committer | Ronald S. Bultje <rsbultje@gmail.com> | 2010-03-17 15:14:18 +0000 |
commit | a7a85dc4c2e3fa818573ab1adc547758fe95b539 (patch) | |
tree | e78cba71241c1645d2d0721da243c4cc91512cf1 /libavformat/ffmdec.c | |
parent | 9109cdca97d22441315b366011949276e774c1a5 (diff) | |
download | ffmpeg-a7a85dc4c2e3fa818573ab1adc547758fe95b539.tar.gz |
Cast sample_fmt (as read from bitstream as a 16-bit value) to int16, so that
negative values, e.g. SAMPLE_FMT_NONE (-1), are read correctly also.
Originally committed as revision 22585 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/ffmdec.c')
-rw-r--r-- | libavformat/ffmdec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/ffmdec.c b/libavformat/ffmdec.c index ff61f21c91..b39836adb4 100644 --- a/libavformat/ffmdec.c +++ b/libavformat/ffmdec.c @@ -354,7 +354,7 @@ static int ffm_read_header(AVFormatContext *s, AVFormatParameters *ap) codec->sample_rate = get_be32(pb); codec->channels = get_le16(pb); codec->frame_size = get_le16(pb); - codec->sample_fmt = get_le16(pb); + codec->sample_fmt = (int16_t) get_le16(pb); break; default: goto fail; |