summaryrefslogtreecommitdiff
path: root/libavcodec/wmaenc.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-02-13 12:49:48 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-02-13 12:49:48 +0100
commit0dff771f31cffffec0e16944d3890564c2da16eb (patch)
tree6c6ab0759ebf48fd5a7a478f97fb2110b4c5ad6e /libavcodec/wmaenc.c
parentdca6fb08a71b8201f0a32f9cff18e7753355733a (diff)
parent205a95f7b5178362874bc1e65eae9866723491c1 (diff)
Merge commit '205a95f7b5178362874bc1e65eae9866723491c1'
* commit '205a95f7b5178362874bc1e65eae9866723491c1': wmaenc: alloc/free coded_frame instead of keeping it in the WMACodecContext wma: decode directly to the user-provided AVFrame wmapro: decode directly to the user-provided AVFrame wavpack: decode directly to the user-provided AVFrame Conflicts: libavcodec/wavpack.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/wmaenc.c')
-rw-r--r--libavcodec/wmaenc.c10
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;
}