changeset 36769:636c79b71de9

av_helpers: avoid deprecated API.
author reimar
date Sun, 16 Feb 2014 16:30:03 +0000
parents fd1feb8ae5fd
children ee000da6fa82
files av_helpers.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/av_helpers.c	Sun Feb 16 16:30:02 2014 +0000
+++ b/av_helpers.c	Sun Feb 16 16:30:03 2014 +0000
@@ -124,7 +124,7 @@
     int n;
     int got;
     AVPacket pkt;
-    AVFrame *frame = avcodec_alloc_frame();
+    AVFrame *frame = av_frame_alloc();
     if ((ctx->channels == 6 || ctx->channels == 5) &&
         (isac3 || !strcmp(ctx->codec->name,"libfaac"))) {
         reorder_channel_nch(src, AF_CHANNEL_LAYOUT_MPLAYER_DEFAULT,
@@ -153,7 +153,7 @@
     n = avcodec_fill_audio_frame(frame, ctx->channels, ctx->sample_fmt, src, src_len, 1);
     if (n < 0) return 0;
     n = avcodec_encode_audio2(ctx, &pkt, frame, &got);
-    avcodec_free_frame(&frame);
+    av_frame_free(&frame);
     if (planar) av_free(src);
     if (n < 0) return n;
     return got ? pkt.size : 0;