summaryrefslogtreecommitdiff
path: root/libavcodec/vp9.c
diff options
context:
space:
mode:
authorDenis Charmet <typx@dinauz.org>2016-06-04 13:22:42 +0200
committerDiego Biurrun <diego@biurrun.de>2016-06-05 16:58:04 +0200
commit38f99017e69bd25e88be87117237c29727c25635 (patch)
tree31148b6760cc5e5f782e79f57732dcbea94f92b2 /libavcodec/vp9.c
parentb2d5d6a7f20a255a5f3c9bf539cc507afd909ce5 (diff)
downloadffmpeg-38f99017e69bd25e88be87117237c29727c25635.tar.gz
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@biurrun.de>
Diffstat (limited to 'libavcodec/vp9.c')
-rw-r--r--libavcodec/vp9.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/vp9.c b/libavcodec/vp9.c
index 45f0771695..c11e9b8601 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;
}
}