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:
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);
}