diff options
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 7eaa4573b1..0ee5ddae57 100644 --- a/libavcodec/wmaenc.c +++ b/libavcodec/wmaenc.c @@ -50,6 +50,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; @@ -85,11 +90,6 @@ static int encode_init(AVCodecContext * avctx){ 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; } |