Browse Source

adpcmenc: check return value of avcodec_alloc_frame()

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n0.11
Paul B Mahol Michael Niedermayer 13 years ago
parent
commit
82c252972b
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      libavcodec/adpcmenc.c

+ 2
- 1
libavcodec/adpcmenc.c View File

@@ -137,7 +137,8 @@ static av_cold int adpcm_encode_init(AVCodecContext *avctx)
}

avctx->coded_frame = avcodec_alloc_frame();
avctx->coded_frame->key_frame= 1;
if (!avctx->coded_frame)
goto error;

return 0;
error:


Loading…
Cancel
Save