Mercurial > libavformat.hg
changeset 5855:98bd293526db libavformat
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.
author | rbultje |
---|---|
date | Wed, 17 Mar 2010 15:14:18 +0000 |
parents | 3dc78fb78b2a |
children | a1121e5fa662 |
files | ffmdec.c |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/ffmdec.c Tue Mar 16 21:45:30 2010 +0000 +++ b/ffmdec.c Wed Mar 17 15:14:18 2010 +0000 @@ -354,7 +354,7 @@ 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;