Commit 8dbc6d03 authored by Justin Ruggles's avatar Justin Ruggles

dpcm: do not try to decode empty packets

parent e79da632
...@@ -198,7 +198,7 @@ static int dpcm_decode_frame(AVCodecContext *avctx, void *data, int *data_size, ...@@ -198,7 +198,7 @@ static int dpcm_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
break; break;
} }
out *= av_get_bytes_per_sample(avctx->sample_fmt); 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"); av_log(avctx, AV_LOG_ERROR, "packet is too small\n");
return AVERROR(EINVAL); return AVERROR(EINVAL);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment