[vlc-devel] [PATCH] Contrib: fix VP9 packet decoder returning 0 instead of the used data
Steve Lhomme
robUx4 at videolabs.io
Tue Mar 3 11:46:01 CET 2015
Fixes #14022
See https://trac.videolan.org/vlc/ticket/14022#comment:6
---
contrib/src/ffmpeg/rules.mak | 3 +++
contrib/src/ffmpeg/vp9-loop.patch | 36 ++++++++++++++++++++++++++++++++++++
2 files changed, 39 insertions(+)
create mode 100644 contrib/src/ffmpeg/vp9-loop.patch
diff --git a/contrib/src/ffmpeg/rules.mak b/contrib/src/ffmpeg/rules.mak
index 9041e09..4924471 100644
--- a/contrib/src/ffmpeg/rules.mak
+++ b/contrib/src/ffmpeg/rules.mak
@@ -176,6 +176,9 @@ ffmpeg: ffmpeg-$(HASH).tar.xz .sum-ffmpeg
rm -Rf $@ $@-$(HASH)
mkdir -p $@-$(HASH)
$(XZCAT) "$<" | (cd $@-$(HASH) && tar xv --strip-components=1)
+ifdef USE_FFMPEG
+ $(APPLY) $(SRC)/ffmpeg/vp9-loop.patch
+endif
$(MOVE)
.ffmpeg: ffmpeg
diff --git a/contrib/src/ffmpeg/vp9-loop.patch b/contrib/src/ffmpeg/vp9-loop.patch
new file mode 100644
index 0000000..8934e37
--- /dev/null
+++ b/contrib/src/ffmpeg/vp9-loop.patch
@@ -0,0 +1,36 @@
+From 97478001d73e08764ce2da1d3c45d98c6538b988 Mon Sep 17 00:00:00 2001
+From: Steve Lhomme <robUx4 at videolabs.io>
+Date: Tue, 3 Mar 2015 11:15:24 +0100
+Subject: [PATCH] fix VP9 packet decoder returning 0 instead of the used data
+ size
+
+See https://trac.videolan.org/vlc/ticket/14022#comment:6
+---
+ libavcodec/vp9.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/libavcodec/vp9.c b/libavcodec/vp9.c
+index 2bb2432..c7f351b 100644
+--- a/libavcodec/vp9.c
++++ b/libavcodec/vp9.c
+@@ -3760,7 +3760,7 @@ static int vp9_decode_frame(AVCodecContext *ctx, void *frame,
+ if ((res = av_frame_ref(frame, s->refs[ref].f)) < 0)
+ return res;
+ *got_frame = 1;
+- return 0;
++ return pkt->size;
+ }
+ data += res;
+ size -= res;
+@@ -3984,7 +3984,7 @@ static int vp9_decode_frame(AVCodecContext *ctx, void *frame,
+ *got_frame = 1;
+ }
+
+- return 0;
++ return pkt->size;
+ }
+
+ static void vp9_decode_flush(AVCodecContext *ctx)
+--
+1.9.5.msysgit.0
+
--
2.2.2
More information about the vlc-devel
mailing list