diff options
author | Justin Ruggles <justin.ruggles@gmail.com> | 2011-10-27 13:58:05 -0400 |
---|---|---|
committer | Justin Ruggles <justin.ruggles@gmail.com> | 2011-10-29 16:43:40 -0400 |
commit | 7d1b17b83330aefe2f32a66fe84effe46ae51014 (patch) | |
tree | 06193489374566b91b10125f7f5b40b7698589ca /libavcodec | |
parent | 405af431040a57c630716b3940d7240021e8b80c (diff) | |
download | ffmpeg-7d1b17b83330aefe2f32a66fe84effe46ae51014.tar.gz |
cin audio: use sign_extend() instead of casting to int16_t
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/dsicinav.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/dsicinav.c b/libavcodec/dsicinav.c index a6a4ff1c6e..cbf7c4a6f8 100644 --- a/libavcodec/dsicinav.c +++ b/libavcodec/dsicinav.c @@ -26,6 +26,7 @@ #include "avcodec.h" #include "bytestream.h" +#include "mathops.h" typedef enum CinVideoBitmapIndex { @@ -339,7 +340,7 @@ static int cinaudio_decode_frame(AVCodecContext *avctx, delta = cin->delta; if (cin->initial_decode_frame) { cin->initial_decode_frame = 0; - delta = (int16_t)AV_RL16(buf); + delta = sign_extend(AV_RL16(buf), 16); buf += 2; *samples++ = delta; } |