summaryrefslogtreecommitdiff
path: root/src/libffmpeg/libavcodec/dpcm.c
diff options
context:
space:
mode:
authorMike Melanson <mike@multimedia.cx>2004-02-01 05:31:16 +0000
committerMike Melanson <mike@multimedia.cx>2004-02-01 05:31:16 +0000
commit61d793ef13ac2ef8f9c2b41b71430f21fac80337 (patch)
tree69a1b20b01993b4d61fe1c8c2be33dd2e362a40c /src/libffmpeg/libavcodec/dpcm.c
parentf707774ac5d48c02c6a36327304d88629b0e38f9 (diff)
downloadxine-lib-61d793ef13ac2ef8f9c2b41b71430f21fac80337.tar.gz
xine-lib-61d793ef13ac2ef8f9c2b41b71430f21fac80337.tar.bz2
sync to ffmpeg build 4699
CVS patchset: 6090 CVS date: 2004/02/01 05:31:16
Diffstat (limited to 'src/libffmpeg/libavcodec/dpcm.c')
-rw-r--r--src/libffmpeg/libavcodec/dpcm.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/libffmpeg/libavcodec/dpcm.c b/src/libffmpeg/libavcodec/dpcm.c
index aed892c53..b59a9cd6b 100644
--- a/src/libffmpeg/libavcodec/dpcm.c
+++ b/src/libffmpeg/libavcodec/dpcm.c
@@ -44,10 +44,6 @@ typedef struct DPCMContext {
#define SATURATE_S16(x) if (x < -32768) x = -32768; \
else if (x > 32767) x = 32767;
#define SE_16BIT(x) if (x & 0x8000) x -= 0x10000;
-
-#undef LE_16
-#undef LE_32
-
#define LE_16(x) ((((uint8_t*)(x))[1] << 8) | ((uint8_t*)(x))[0])
#define LE_32(x) ((((uint8_t*)(x))[3] << 24) | \
(((uint8_t*)(x))[2] << 16) | \
@@ -129,6 +125,9 @@ static int dpcm_decode_frame(AVCodecContext *avctx,
unsigned char byte;
short diff;
+ if (!buf_size)
+ return 0;
+
switch(avctx->codec->id) {
case CODEC_ID_ROQ_DPCM: