[FFmpeg-devel] [PATCH] fix VP9 packet decoder returning 0 instead of the used data size

Steve Lhomme robUx4 at videolabs.io
Tue Mar 3 12:06:40 CET 2015


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)
-- 
2.2.2



More information about the ffmpeg-devel mailing list