[FFmpeg-cvslog] r12955 - trunk/libavcodec/libgsm.c
mbardiaux
subversion
Fri Apr 25 15:25:11 CEST 2008
Author: mbardiaux
Date: Fri Apr 25 15:25:11 2008
New Revision: 12955
Log:
Make sure some value is always returned via data_size
Modified:
trunk/libavcodec/libgsm.c
Modified: trunk/libavcodec/libgsm.c
==============================================================================
--- trunk/libavcodec/libgsm.c (original)
+++ trunk/libavcodec/libgsm.c Fri Apr 25 15:25:11 2008
@@ -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;
More information about the ffmpeg-cvslog
mailing list