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>2012-10-10 15:18:05 +0400
committerMichael Niedermayer <michaelni@gmx.at>2012-10-10 15:18:05 +0400
commit50b5477616c8f6001a575fb953db45dd9a14662c (patch)
tree4af87567da08f040334d6ac938528c14b116825c /libavcodec/vc1dec.c
parenteadba3e94daac2f48fd9ce7c9fdf5a562d3274ed (diff)
parentb94e4acb4874843e914fd3cb8e089aff0756bb4a (diff)
Merge commit 'b94e4acb4874843e914fd3cb8e089aff0756bb4a'
* commit 'b94e4acb4874843e914fd3cb8e089aff0756bb4a': cmdutils_read_file: increment *size after writing the trailing \0 af_resample: unref out_buf when avresample_convert returns 0 af_amix: prevent memory leak on error path vc1dec: prevent memory leak in error path vc1dec: prevent memory leak on av_realloc error af_channelmap: free old extended_data on reallocation avconv: simplify memory allocation in copy_chapters matroskaenc: check cue point validity before reallocation swfenc: error out for more than 1 audio or video stream build: link test programs only against static libs Conflicts: ffmpeg_opt.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/vc1dec.c')
-rw-r--r--libavcodec/vc1dec.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c
index e7085f6d73..639d3174fa 100644
--- a/libavcodec/vc1dec.c
+++ b/libavcodec/vc1dec.c
@@ -5369,9 +5369,10 @@ static int vc1_decode_frame(AVCodecContext *avctx, void *data,
break;
case VC1_CODE_FIELD: {
int buf_size3;
- slices = av_realloc(slices, sizeof(*slices) * (n_slices+1));
- if (!slices)
+ tmp = av_realloc(slices, sizeof(*slices) * (n_slices+1));
+ if (!tmp)
goto err;
+ slices = tmp;
slices[n_slices].buf = av_mallocz(buf_size + FF_INPUT_BUFFER_PADDING_SIZE);
if (!slices[n_slices].buf)
goto err;
@@ -5393,9 +5394,10 @@ static int vc1_decode_frame(AVCodecContext *avctx, void *data,
break;
case VC1_CODE_SLICE: {
int buf_size3;
- slices = av_realloc(slices, sizeof(*slices) * (n_slices+1));
- if (!slices)
+ tmp = av_realloc(slices, sizeof(*slices) * (n_slices+1));
+ if (!tmp)
goto err;
+ slices = tmp;
slices[n_slices].buf = av_mallocz(buf_size + FF_INPUT_BUFFER_PADDING_SIZE);
if (!slices[n_slices].buf)
goto err;
@@ -5466,7 +5468,7 @@ static int vc1_decode_frame(AVCodecContext *avctx, void *data,
if (!s->context_initialized) {
if (ff_msmpeg4_decode_init(avctx) < 0 || ff_vc1_decode_init_alloc_tables(v) < 0)
- return -1;
+ goto err;
s->low_delay = !avctx->has_b_frames || v->res_sprite;