[FFmpeg-cvslog] vp9: Return the correct size when decoding a superframe

Denis Charmet git at videolan.org
Mon Jun 27 19:55:06 CEST 2016


ffmpeg | branch: master | Denis Charmet <typx at dinauz.org> | Sat Jun  4 13:22:42 2016 +0200| [38f99017e69bd25e88be87117237c29727c25635] | committer: Diego Biurrun

vp9: Return the correct size when decoding a superframe

According to avcodec.h, avcodec_decode_video2 should return the number of
bytes used if a frame was decoded.

The current implementation returns size - used size of all the subframes.
This fixes the VLC's bug https://trac.videolan.org/vlc/ticket/16836.

The superframe is always fully consumed.

Signed-off-by: Diego Biurrun <diego at biurrun.de>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=38f99017e69bd25e88be87117237c29727c25635
---

 libavcodec/vp9.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/vp9.c b/libavcodec/vp9.c
index 45f0771..c11e9b8 100644
--- a/libavcodec/vp9.c
+++ b/libavcodec/vp9.c
@@ -1251,7 +1251,7 @@ static int vp9_decode_packet(AVCodecContext *avctx, void *frame,
                 data += sz;
                 size -= sz;
             }
-            return size;
+            return avpkt->size;
         }
     }
 



More information about the ffmpeg-cvslog mailing list