diff options
author | Michel Bardiaux <mbardiaux@mediaxim.be> | 2008-04-25 13:25:11 +0000 |
---|---|---|
committer | Michel Bardiaux <mbardiaux@mediaxim.be> | 2008-04-25 13:25:11 +0000 |
commit | 202aca676f09b803645a6f32715162c76a41d772 (patch) | |
tree | fca48f822f05232d2e55122b28897ade23db22b2 /libavcodec | |
parent | 3b8c000d1e85724ad4e2dcc3382a2651978b0109 (diff) | |
download | ffmpeg-202aca676f09b803645a6f32715162c76a41d772.tar.gz |
Make sure some value is always returned via data_size
Originally committed as revision 12955 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/libgsm.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/libavcodec/libgsm.c b/libavcodec/libgsm.c index 82e00b1f51..995b467616 100644 --- a/libavcodec/libgsm.c +++ b/libavcodec/libgsm.c @@ -121,9 +121,8 @@ AVCodec libgsm_ms_encoder = { static int libgsm_decode_frame(AVCodecContext *avctx, void *data, int *data_size, uint8_t *buf, int buf_size) { - - if(buf_size < avctx->block_align) return 0; - + *data_size = 0; /* In case of error */ + if(buf_size < avctx->block_align) return -1; switch(avctx->codec_id) { case CODEC_ID_GSM: if(gsm_decode(avctx->priv_data,buf,data)) return -1; |