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;