deps/media-playback: Fix hw decode dropping last few frames

Fixes a bug where hardware frames would not transfer to RAM for the last
few frames of a video.  The 'ret' variable can be 0 even though there
are still frames ready.
This commit is contained in:
jp9000 2019-08-29 11:55:49 -07:00
parent 6943d9a973
commit 43957286d7

View file

@ -310,7 +310,7 @@ static int decode_packet(struct mp_decode *d, int *got_frame)
#endif
#ifdef USE_NEW_HARDWARE_CODEC_METHOD
if (*got_frame && ret && d->hw) {
if (*got_frame && d->hw) {
if (d->hw_frame->format != d->hw_format) {
d->frame = d->hw_frame;
return ret;