summaryrefslogtreecommitdiff
path: root/libavcodec/dpcm.c
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2011-11-02 16:49:38 -0400
committerJustin Ruggles <justin.ruggles@gmail.com>2011-11-11 14:17:39 -0500
commit8dbc6d03c0ad5fc2f8067f7a43209e2fcbb204b0 (patch)
tree0058153d529f7dc69260c93a1ef657f53e7962cf /libavcodec/dpcm.c
parente79da63282b354fb721ac4b763d268649f0efd76 (diff)
dpcm: do not try to decode empty packets
Diffstat (limited to 'libavcodec/dpcm.c')
-rw-r--r--libavcodec/dpcm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/dpcm.c b/libavcodec/dpcm.c
index f6531db28b..abb2019306 100644
--- a/libavcodec/dpcm.c
+++ b/libavcodec/dpcm.c
@@ -198,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);
}