summaryrefslogtreecommitdiffstats
path: root/contrib/ffmpeg/A14-aacenc-high-bitrate-crash.patch
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/ffmpeg/A14-aacenc-high-bitrate-crash.patch')
-rw-r--r--contrib/ffmpeg/A14-aacenc-high-bitrate-crash.patch28
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
+