mirror of
https://github.com/libretro/RetroArch
synced 2025-01-31 15:32:59 +00:00
Merge pull request #10100 from hasenbanck/fix-ffmpeg-seek
Fix crash on seeking when using HW decoding in some cases.
This commit is contained in:
commit
0b7edbad28
@ -497,9 +497,6 @@ static void seek_frame(int seek_frames)
|
||||
}
|
||||
audio_frames = frame_cnt * media.sample_rate / media.interpolate_fps;
|
||||
|
||||
tpool_wait(tpool);
|
||||
video_buffer_clear(video_buffer);
|
||||
|
||||
if (audio_decode_fifo)
|
||||
fifo_clear(audio_decode_fifo);
|
||||
scond_signal(fifo_decode_cond);
|
||||
@ -512,7 +509,6 @@ static void seek_frame(int seek_frames)
|
||||
}
|
||||
|
||||
slock_unlock(fifo_lock);
|
||||
|
||||
}
|
||||
|
||||
void CORE_PREFIX(retro_run)(void)
|
||||
@ -1363,7 +1359,8 @@ static void decode_video(AVCodecContext *ctx, AVPacket *pkt, size_t frame_size)
|
||||
{
|
||||
if (main_sleeping)
|
||||
{
|
||||
log_cb(RETRO_LOG_ERROR, "[FFMPEG] Thread: Video deadlock detected.\n");
|
||||
if (!do_seek)
|
||||
log_cb(RETRO_LOG_ERROR, "[FFMPEG] Thread: Video deadlock detected.\n");
|
||||
tpool_wait(tpool);
|
||||
video_buffer_clear(video_buffer);
|
||||
return;
|
||||
|
Loading…
x
Reference in New Issue
Block a user