[FFmpeg-cvslog] r22585 - trunk/libavformat/ffmdec.c
rbultje
subversion
Wed Mar 17 16:14:18 CET 2010
Author: rbultje
Date: Wed Mar 17 16:14:18 2010
New Revision: 22585
Log:
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.
Modified:
trunk/libavformat/ffmdec.c
Modified: trunk/libavformat/ffmdec.c
==============================================================================
--- trunk/libavformat/ffmdec.c Wed Mar 17 16:06:27 2010 (r22584)
+++ trunk/libavformat/ffmdec.c Wed Mar 17 16:14:18 2010 (r22585)
@@ -354,7 +354,7 @@ static int ffm_read_header(AVFormatConte
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;
More information about the ffmpeg-cvslog
mailing list