Commit ace87756 authored by mbardiaux's avatar mbardiaux

Make sure some value is always returned via data_size


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@12955 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent b765eb33
...@@ -121,9 +121,8 @@ AVCodec libgsm_ms_encoder = { ...@@ -121,9 +121,8 @@ AVCodec libgsm_ms_encoder = {
static int libgsm_decode_frame(AVCodecContext *avctx, static int libgsm_decode_frame(AVCodecContext *avctx,
void *data, int *data_size, void *data, int *data_size,
uint8_t *buf, int buf_size) { uint8_t *buf, int buf_size) {
*data_size = 0; /* In case of error */
if(buf_size < avctx->block_align) return 0; if(buf_size < avctx->block_align) return -1;
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;
......
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