Skip to content

Commit

Permalink
cin audio: use sign_extend() instead of casting to int16_t
Browse files Browse the repository at this point in the history
  • Loading branch information
justinruggles committed Oct 29, 2011
1 parent 405af43 commit 7d1b17b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion libavcodec/dsicinav.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

#include "avcodec.h"
#include "bytestream.h"
#include "mathops.h"


typedef enum CinVideoBitmapIndex {
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 7d1b17b

Please sign in to comment.