mirror of https://git.ffmpeg.org/ffmpeg.git
Make sure some value is always returned via data_size
Originally committed as revision 12955 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
3b8c000d1e
commit
202aca676f
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue