[FFmpeg-devel] [PATCH] libfdk-aac: Port to ff_alloc_packet2

Paul B Mahol onemda at gmail.com
Fri Jul 13 03:29:03 CEST 2012


On 7/13/12, Derek Buitenhuis <derek.buitenhuis at gmail.com> wrote:
> Signed-off-by: Derek Buitenhuis <derek.buitenhuis at gmail.com>
> ---
>  libavcodec/libfdk-aacenc.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libavcodec/libfdk-aacenc.c b/libavcodec/libfdk-aacenc.c
> index 32d91e9..576d1ff 100644
> --- a/libavcodec/libfdk-aacenc.c
> +++ b/libavcodec/libfdk-aacenc.c
> @@ -306,7 +306,7 @@ static int aac_encode_frame(AVCodecContext *avctx,
> AVPacket *avpkt,
>      }
>
>      /* The maximum packet size is 6144 bits aka 768 bytes per channel. */
> -    if ((ret = ff_alloc_packet(avpkt, FFMAX(8192, 768 * avctx->channels))))
> {
> +    if ((ret = ff_alloc_packet2(avctx, avpkt, FFMAX(8192, 768 *
> avctx->channels)))) {
>          av_log(avctx, AV_LOG_ERROR, "Error getting output packet\n");

redundant
>          return ret;
>      }
nit: {} is not needed.


More information about the ffmpeg-devel mailing list