You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
gsm: log error message when packet is too small
This commit is contained in:
@@ -66,8 +66,10 @@ static int gsm_decode_frame(AVCodecContext *avctx, void *data,
|
|||||||
return AVERROR(EINVAL);
|
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;
|
return AVERROR_INVALIDDATA;
|
||||||
|
}
|
||||||
|
|
||||||
switch (avctx->codec_id) {
|
switch (avctx->codec_id) {
|
||||||
case CODEC_ID_GSM:
|
case CODEC_ID_GSM:
|
||||||
|
@@ -175,7 +175,11 @@ static int libgsm_decode_frame(AVCodecContext *avctx,
|
|||||||
return AVERROR(EINVAL);
|
return AVERROR(EINVAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(buf_size < avctx->block_align) return -1;
|
if (buf_size < avctx->block_align) {
|
||||||
|
av_log(avctx, AV_LOG_ERROR, "Packet is too small\n");
|
||||||
|
return AVERROR_INVALIDDATA;
|
||||||
|
}
|
||||||
|
|
||||||
switch(avctx->codec_id) {
|
switch(avctx->codec_id) {
|
||||||
case CODEC_ID_GSM:
|
case CODEC_ID_GSM:
|
||||||
if(gsm_decode(avctx->priv_data,buf,data)) return -1;
|
if(gsm_decode(avctx->priv_data,buf,data)) return -1;
|
||||||
|
Reference in New Issue
Block a user