Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-02-18 00:58:31 +0300
committerMichael Niedermayer <michaelni@gmx.at>2015-02-18 00:58:31 +0300
commit2e786bc4989835f6d82cc187c4bb37716521a0bf (patch)
tree7eaacc0565d80691d41d2da51ee1deb458144f60 /libavcodec/aac_adtstoasc_bsf.c
parent38e867f6c08ed421840bb29337351db59d8e4f86 (diff)
avcodec/aac_adtstoasc_bsf: Clear extradata_size on allocation failure
This keeps the fields consistent Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/aac_adtstoasc_bsf.c')
-rw-r--r--libavcodec/aac_adtstoasc_bsf.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/aac_adtstoasc_bsf.c b/libavcodec/aac_adtstoasc_bsf.c
index 8c5d580b02..1f11d02499 100644
--- a/libavcodec/aac_adtstoasc_bsf.c
+++ b/libavcodec/aac_adtstoasc_bsf.c
@@ -90,8 +90,10 @@ static int aac_adtstoasc_filter(AVBitStreamFilterContext *bsfc,
av_free(avctx->extradata);
avctx->extradata_size = 2 + pce_size;
avctx->extradata = av_mallocz(avctx->extradata_size + FF_INPUT_BUFFER_PADDING_SIZE);
- if (!avctx->extradata)
+ if (!avctx->extradata) {
+ avctx->extradata_size = 0;
return AVERROR(ENOMEM);
+ }
init_put_bits(&pb, avctx->extradata, avctx->extradata_size);
put_bits(&pb, 5, hdr.object_type);