Fix deadlock on exit if SKIP_FRAMES disabled
On exit, the renderer will not consume frames anymore, so signal the condition variable to wake up the decoder.
This commit is contained in:
@@ -14,6 +14,7 @@ struct frames {
|
||||
AVFrame *rendering_frame;
|
||||
SDL_mutex *mutex;
|
||||
#ifndef SKIP_FRAMES
|
||||
SDL_bool stopped;
|
||||
SDL_cond *rendering_frame_consumed_cond;
|
||||
#endif
|
||||
SDL_bool rendering_frame_consumed;
|
||||
@@ -33,4 +34,7 @@ SDL_bool frames_offer_decoded_frame(struct frames *frames);
|
||||
// unlocking frames->mutex
|
||||
const AVFrame *frames_consume_rendered_frame(struct frames *frames);
|
||||
|
||||
// wake up and avoid any blocking call
|
||||
void frames_stop(struct frames *frames);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user