# HG changeset patch # User reimar # Date 1392568203 0 # Node ID 636c79b71de9206e16b3f7902e1e767ca168e920 # Parent fd1feb8ae5fd9fad7cfa98884958d02354270af9 av_helpers: avoid deprecated API. diff -r fd1feb8ae5fd -r 636c79b71de9 av_helpers.c --- 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;