summaryrefslogtreecommitdiffstats
path: root/libavcodec/pcm.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/pcm.c')
-rw-r--r--libavcodec/pcm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/pcm.c b/libavcodec/pcm.c
index 26c38b3..4011ed3 100644
--- a/libavcodec/pcm.c
+++ b/libavcodec/pcm.c
@@ -410,8 +410,8 @@ static int pcm_decode_frame(AVCodecContext *avctx,
samples = data;
src = buf;
- if(buf_size > AVCODEC_MAX_AUDIO_FRAME_SIZE/2)
- buf_size = AVCODEC_MAX_AUDIO_FRAME_SIZE/2;
+ buf_size= FFMIN(buf_size, *data_size/2);
+ *data_size=0;
switch(avctx->codec->id) {
case CODEC_ID_PCM_S32LE:
OpenPOWER on IntegriCloud