[vlc-commits] contrib: ffmpeg: remove libav vda patch
David Fuhrmann
git at videolan.org
Sun Feb 2 15:46:33 CET 2014
vlc/vlc-2.1 | branch: master | David Fuhrmann <david.fuhrmann at googlemail.com> | Sun Feb 2 15:45:26 2014 +0100| [c5f61c90318df9a500dd16ff80c5f00fed257c51] | committer: David Fuhrmann
contrib: ffmpeg: remove libav vda patch
This is broken with the ffmpeg, with is used for now.
> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.1.git/?a=commit;h=c5f61c90318df9a500dd16ff80c5f00fed257c51
---
contrib/src/ffmpeg/fix-vda-memleak.patch | 56 ------------------------------
contrib/src/ffmpeg/rules.mak | 3 --
2 files changed, 59 deletions(-)
diff --git a/contrib/src/ffmpeg/fix-vda-memleak.patch b/contrib/src/ffmpeg/fix-vda-memleak.patch
deleted file mode 100644
index c147a8a..0000000
--- a/contrib/src/ffmpeg/fix-vda-memleak.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From e952bd35716bd35c7e825cd8a18fc73aedc3edcc Mon Sep 17 00:00:00 2001
-From: Sebastien Zwickert <dilaroga at gmail.com>
-Date: Wed, 24 Jul 2013 11:36:01 +0200
-Subject: [PATCH] vda_h264: Use av_buffer to manage buffers
-
-Fix a buffer leak when seeking occurs.
-
-Signed-off-by: Luca Barbato <lu_zero at gentoo.org>
----
- libavcodec/vda_h264.c | 25 ++++++++++++++++++++++++-
- 2 files changed, 25 insertions(+), 2 deletions(-)
-
-diff --git a/libavcodec/vda_h264.c b/libavcodec/vda_h264.c
-index 6c1845a..7328d58 100644
---- a/libavcodec/vda_h264.c
-+++ b/libavcodec/vda_h264.c
-@@ -107,6 +107,12 @@ static int vda_h264_decode_slice(AVCodecContext *avctx,
- return 0;
- }
-
-+static void vda_h264_release_buffer(void *opaque, uint8_t *data)
-+{
-+ CVPixelBufferRef cv_buffer = opaque;
-+ CVPixelBufferRelease(cv_buffer);
-+}
-+
- static int vda_h264_end_frame(AVCodecContext *avctx)
- {
- H264Context *h = avctx->priv_data;
-@@ -120,8 +126,25 @@ static int vda_h264_end_frame(AVCodecContext *avctx)
- status = vda_sync_decode(vda_ctx);
- frame->data[3] = (void*)vda_ctx->cv_buffer;
-
-- if (status)
-+ if (status) {
- av_log(avctx, AV_LOG_ERROR, "Failed to decode frame (%d)\n", status);
-+ return status;
-+ }
-+
-+ /* VDA workaround to release properly each core video buffer:
-+ * we need to create an extra av_buffer with a custom freeing callback
-+ * to avoid potential memory leaks. */
-+ h->cur_pic_ptr->hwaccel_priv_buf = av_buffer_create(frame->data[0],
-+ 0,
-+ vda_h264_release_buffer,
-+ vda_ctx->cv_buffer,
-+ 0);
-+ if (!h->cur_pic_ptr->hwaccel_priv_buf) {
-+ CVPixelBufferRelease(vda_ctx->cv_buffer);
-+ return AVERROR(ENOMEM);
-+ }
-+
-+ h->cur_pic_ptr->hwaccel_picture_private = h->cur_pic_ptr->hwaccel_priv_buf->data;
-
- return status;
- }
diff --git a/contrib/src/ffmpeg/rules.mak b/contrib/src/ffmpeg/rules.mak
index 2df26ea..fbd7f23 100644
--- a/contrib/src/ffmpeg/rules.mak
+++ b/contrib/src/ffmpeg/rules.mak
@@ -149,9 +149,6 @@ ffmpeg: ffmpeg-$(HASH).tar.gz .sum-ffmpeg
mkdir -p $@-$(HASH)
$(ZCAT) "$<" | (cd $@-$(HASH) && tar xv --strip-components=1)
- # this patch is only needed for libav version b1f9cdc37ff5d5b391d2cd9af737ab4e5a0fc1c0
- $(APPLY) $(SRC)/ffmpeg/fix-vda-memleak.patch
-
$(MOVE)
.ffmpeg: ffmpeg
More information about the vlc-commits
mailing list