]> git.sesse.net Git - ffmpeg/commitdiff
vp9: Return the correct size when decoding a superframe
authorDenis Charmet <typx@dinauz.org>
Sat, 4 Jun 2016 11:22:42 +0000 (13:22 +0200)
committerDiego Biurrun <diego@biurrun.de>
Sun, 5 Jun 2016 14:58:04 +0000 (16:58 +0200)
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@biurrun.de>
libavcodec/vp9.c

index 45f0771695897e7a92deeb2628c3dd8a268f96ac..c11e9b86018cb91b68325445022d4d213ec19a91 100644 (file)
@@ -1251,7 +1251,7 @@ static int vp9_decode_packet(AVCodecContext *avctx, void *frame,
                 data += sz;
                 size -= sz;
             }
-            return size;
+            return avpkt->size;
         }
     }