Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/dpcm.c')
-rw-r--r--libavcodec/dpcm.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/libavcodec/dpcm.c b/libavcodec/dpcm.c
index 8f6cd8e115..2f87f51774 100644
--- a/libavcodec/dpcm.c
+++ b/libavcodec/dpcm.c
@@ -179,9 +179,6 @@ static int dpcm_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
int stereo = s->channels - 1;
int16_t *output_samples = data;
- if (!buf_size)
- return 0;
-
/* calculate output size */
switch(avctx->codec->id) {
case CODEC_ID_ROQ_DPCM:
@@ -201,7 +198,7 @@ static int dpcm_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
break;
}
out *= av_get_bytes_per_sample(avctx->sample_fmt);
- if (out < 0) {
+ if (out <= 0) {
av_log(avctx, AV_LOG_ERROR, "packet is too small\n");
return AVERROR(EINVAL);
}