summaryrefslogtreecommitdiff
path: root/libavcodec/gsmdec.c
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2011-10-28 10:18:07 -0400
committerJustin Ruggles <justin.ruggles@gmail.com>2011-11-02 14:41:17 -0400
commit9d52f0a7113d9ce14e038f8e65fd0e92ce0d33c1 (patch)
treef1c251ecb8fee95c1d7ef9164ad8279654b0a2c9 /libavcodec/gsmdec.c
parent9671db824565658154b638c97cfd3a9733117400 (diff)
gsm: log error message when packet is too small
Diffstat (limited to 'libavcodec/gsmdec.c')
-rw-r--r--libavcodec/gsmdec.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/gsmdec.c b/libavcodec/gsmdec.c
index f084b14553..1091745f4b 100644
--- a/libavcodec/gsmdec.c
+++ b/libavcodec/gsmdec.c
@@ -66,8 +66,10 @@ static int gsm_decode_frame(AVCodecContext *avctx, void *data,
return AVERROR(EINVAL);
}
- if(buf_size < avctx->block_align)
+ if (buf_size < avctx->block_align) {
+ av_log(avctx, AV_LOG_ERROR, "Packet is too small\n");
return AVERROR_INVALIDDATA;
+ }
switch (avctx->codec_id) {
case CODEC_ID_GSM: