mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-07-14 23:34:08 +00:00
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:
parent
6943d9a973
commit
43957286d7
2
deps/media-playback/media-playback/decode.c
vendored
2
deps/media-playback/media-playback/decode.c
vendored
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue