1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00

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>
This commit is contained in:
Denis Charmet 2016-06-04 13:22:42 +02:00 committed by Diego Biurrun
parent b2d5d6a7f2
commit 38f99017e6

View File

@ -1251,7 +1251,7 @@ static int vp9_decode_packet(AVCodecContext *avctx, void *frame,
data += sz;
size -= sz;
}
return size;
return avpkt->size;
}
}