Merge commit '7fa72700298107fe756311ecb4dee5270ff12d35' into release/0.10

* commit '7fa72700298107fe756311ecb4dee5270ff12d35':
  swscale: Fix an undefined behaviour
  apedec: do not buffer decoded samples over AVPackets
  isom: lpcm in mov default to big endian

Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2014-06-03 02:41:16 +02:00
commit d499685d80
3 changed files with 3 additions and 4 deletions

View File

@ -822,7 +822,6 @@ static int ape_decode_frame(AVCodecContext *avctx, void *data,
int16_t *samples;
int i, ret;
int blockstodecode;
int bytes_used = 0;
/* this should never be negative, but bad things will happen if it is, so
check it just to make sure. */
@ -877,7 +876,6 @@ static int ape_decode_frame(AVCodecContext *avctx, void *data,
return AVERROR_INVALIDDATA;
}
bytes_used = buf_size;
}
if (!s->data) {
@ -920,7 +918,7 @@ static int ape_decode_frame(AVCodecContext *avctx, void *data,
*got_frame_ptr = 1;
*(AVFrame *)data = s->frame;
return bytes_used;
return (s->samples == 0) ? buf_size : 0;
}
static void ape_flush(AVCodecContext *avctx)

View File

@ -263,6 +263,7 @@ const AVCodecTag codec_movaudio_tags[] = {
{ CODEC_ID_PCM_MULAW, MKTAG('u', 'l', 'a', 'w') },
{ CODEC_ID_PCM_S16BE, MKTAG('t', 'w', 'o', 's') },
{ CODEC_ID_PCM_S16LE, MKTAG('s', 'o', 'w', 't') },
{ CODEC_ID_PCM_S16BE, MKTAG('l', 'p', 'c', 'm') },
{ CODEC_ID_PCM_S16LE, MKTAG('l', 'p', 'c', 'm') },
{ CODEC_ID_PCM_S24BE, MKTAG('i', 'n', '2', '4') },
{ CODEC_ID_PCM_S24LE, MKTAG('i', 'n', '2', '4') },

View File

@ -280,7 +280,7 @@ static int initFilter(int16_t **outFilter, int32_t **filterPos, int *outFilterSi
xDstInSrc= xInc - 0x10000;
for (i=0; i<dstW; i++) {
int xx= (xDstInSrc - ((filterSize-2)<<16)) / (1<<17);
int xx = (xDstInSrc - ((int64_t)(filterSize - 2) << 16)) / (1 << 17);
int j;
(*filterPos)[i]= xx;
for (j=0; j<filterSize; j++) {