[vlc-commits] Contribs: possibly fix encoding in audio
Jean-Baptiste Kempf
git at videolan.org
Wed Dec 5 12:17:54 CET 2012
vlc/vlc-2.0 | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Wed Dec 5 12:12:30 2012 +0100| [3a1de5413ae0b61112d6dcde9e88f12c8c30b195] | committer: Jean-Baptiste Kempf
Contribs: possibly fix encoding in audio
Should close #7804 #7692 #7748
> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=3a1de5413ae0b61112d6dcde9e88f12c8c30b195
---
contrib/src/ffmpeg/libavcodec-a25d912.patch | 28 +++++++++++++++++++++++++++
contrib/src/ffmpeg/rules.mak | 1 +
2 files changed, 29 insertions(+)
diff --git a/contrib/src/ffmpeg/libavcodec-a25d912.patch b/contrib/src/ffmpeg/libavcodec-a25d912.patch
new file mode 100644
index 0000000..5f22179
--- /dev/null
+++ b/contrib/src/ffmpeg/libavcodec-a25d912.patch
@@ -0,0 +1,28 @@
+From: =?utf8?q?Rafa=C3=ABl=20Carr=C3=A9?= <funman at videolan.org>
+Date: Mon, 15 Oct 2012 18:41:55 +0200
+Subject: [PATCH] avcodec_encode_audio(): fix invalid free
+
+Since 2bc0de385, AVFrame needs to be initialized
+before calling avcodec_get_frame_defaults().
+
+Signed-off-by: Anton Khirnov <anton at khirnov.net>
+---
+ libavcodec/utils.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/libavcodec/utils.c b/libavcodec/utils.c
+index bb99a5a..836d953 100644
+--- a/libavcodec/utils.c
++++ b/libavcodec/utils.c
+@@ -1073,7 +1073,7 @@ int attribute_align_arg avcodec_encode_audio(AVCodecContext *avctx,
+ const short *samples)
+ {
+ AVPacket pkt;
+- AVFrame frame0;
++ AVFrame frame0 = { 0 };
+ AVFrame *frame;
+ int ret, samples_size, got_packet;
+
+--
+1.7.2.5
+
diff --git a/contrib/src/ffmpeg/rules.mak b/contrib/src/ffmpeg/rules.mak
index eb0f565..77752fe 100644
--- a/contrib/src/ffmpeg/rules.mak
+++ b/contrib/src/ffmpeg/rules.mak
@@ -126,6 +126,7 @@ ffmpeg: ffmpeg-$(FFMPEG_VERSION).tar.gz .sum-ffmpeg
ifdef HAVE_WIN32
sed -i "s/std=c99/std=gnu99/" $@-$(FFMPEG_VERSION)/configure
endif
+ $(APPLY) $(SRC)/ffmpeg/libav.git-a25d912.patch
$(MOVE)
.ffmpeg: ffmpeg
More information about the vlc-commits
mailing list