diff options
author | John Stebbins <[email protected]> | 2017-02-23 15:49:25 -0700 |
---|---|---|
committer | John Stebbins <[email protected]> | 2017-02-23 15:49:25 -0700 |
commit | 3eb59384d7311bbbe2dafcac7821e120c6d5ce3a (patch) | |
tree | 6fe0c1061f6e244205879188fa129d0755994d5d /contrib | |
parent | 6aebad79439a64738db685bd9c7c442493e49233 (diff) |
libav: fix crash when encoding aac at high bitrate
Fixes https://github.com/HandBrake/HandBrake/issues/510
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/ffmpeg/A14-aacenc-high-bitrate-crash.patch | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/contrib/ffmpeg/A14-aacenc-high-bitrate-crash.patch b/contrib/ffmpeg/A14-aacenc-high-bitrate-crash.patch new file mode 100644 index 000000000..06a640460 --- /dev/null +++ b/contrib/ffmpeg/A14-aacenc-high-bitrate-crash.patch @@ -0,0 +1,28 @@ +From 7facbe6793a89ffeda7230d39fce8ccb5ce76208 Mon Sep 17 00:00:00 2001 +From: John Stebbins <[email protected]> +Date: Thu, 23 Feb 2017 15:42:02 -0700 +Subject: [PATCH] aacenc: fix crash when encoding at high bitrates + +Increases the size of the AVPacket being written into. Although the aac +spec says the max packet size should be 768 * channel count, aacenc +overshoots this and requires a larger buffer. +--- + libavcodec/aacenc.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libavcodec/aacenc.c b/libavcodec/aacenc.c +index 9b0e99b..b63affc 100644 +--- a/libavcodec/aacenc.c ++++ b/libavcodec/aacenc.c +@@ -572,7 +572,7 @@ static int aac_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, + } + start_ch += chans; + } +- if ((ret = ff_alloc_packet(avpkt, 768 * s->channels))) { ++ if ((ret = ff_alloc_packet(avpkt, 8192 * s->channels))) { + av_log(avctx, AV_LOG_ERROR, "Error getting output packet\n"); + return ret; + } +-- +2.9.3 + |