diff options
author | Justin Ruggles <justin.ruggles@gmail.com> | 2012-12-23 20:26:15 -0500 |
---|---|---|
committer | Justin Ruggles <justin.ruggles@gmail.com> | 2013-02-12 12:22:40 -0500 |
commit | 205a95f7b5178362874bc1e65eae9866723491c1 (patch) | |
tree | 99a9271cbb803605ecc2ef338fe957032e53e341 /libavcodec/wmaenc.c | |
parent | c815ca36412e54e641dd0a91bc54f43f4d9d5621 (diff) | |
download | ffmpeg-205a95f7b5178362874bc1e65eae9866723491c1.tar.gz |
wmaenc: alloc/free coded_frame instead of keeping it in the WMACodecContext
Diffstat (limited to 'libavcodec/wmaenc.c')
-rw-r--r-- | libavcodec/wmaenc.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libavcodec/wmaenc.c b/libavcodec/wmaenc.c index bf8c2674b9..f110f89465 100644 --- a/libavcodec/wmaenc.c +++ b/libavcodec/wmaenc.c @@ -52,6 +52,11 @@ static int encode_init(AVCodecContext * avctx){ return AVERROR(EINVAL); } +#if FF_API_OLD_ENCODE_AUDIO + if (!(avctx->coded_frame = avcodec_alloc_frame())) + return AVERROR(ENOMEM); +#endif + /* extract flag infos */ flags1 = 0; flags2 = 1; @@ -88,11 +93,6 @@ static int encode_init(AVCodecContext * avctx){ s->frame_len; avctx->frame_size = avctx->delay = s->frame_len; -#if FF_API_OLD_ENCODE_AUDIO - avctx->coded_frame = &s->frame; - avcodec_get_frame_defaults(avctx->coded_frame); -#endif - return 0; } |