Browse Source

cin audio: use sign_extend() instead of casting to int16_t

tags/n0.9
Justin Ruggles 14 years ago
parent
commit
7d1b17b833
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      libavcodec/dsicinav.c

+ 2
- 1
libavcodec/dsicinav.c View File

@@ -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;
}


Loading…
Cancel
Save