Skip to content
This repository has been archived by the owner on Jun 11, 2020. It is now read-only.

Commit

Permalink
Fixing issue #5.
Browse files Browse the repository at this point in the history
  • Loading branch information
mpenkov committed Sep 25, 2012
1 parent 7948c0a commit 3f4cc09
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tutorial04.c
Expand Up @@ -700,6 +700,13 @@ int main(int argc, char *argv[]) {
case FF_QUIT_EVENT:
case SDL_QUIT:
is->quit = 1;
/*
* If the video has finished playing, then both the picture and
* audio queues are waiting for more data. Make them stop
* waiting and terminate normally.
*/
SDL_CondSignal(is->audioq.cond);
SDL_CondSignal(is->videoq.cond);
SDL_Quit();
return 0;
break;
Expand Down
7 changes: 7 additions & 0 deletions tutorial05.c
Expand Up @@ -824,6 +824,13 @@ int main(int argc, char *argv[]) {
case FF_QUIT_EVENT:
case SDL_QUIT:
is->quit = 1;
/*
* If the video has finished playing, then both the picture and
* audio queues are waiting for more data. Make them stop
* waiting and terminate normally.
*/
SDL_CondSignal(is->audioq.cond);
SDL_CondSignal(is->videoq.cond);
SDL_Quit();
exit(0);
break;
Expand Down
7 changes: 7 additions & 0 deletions tutorial06.c
Expand Up @@ -943,6 +943,13 @@ int main(int argc, char *argv[]) {
case FF_QUIT_EVENT:
case SDL_QUIT:
is->quit = 1;
/*
* If the video has finished playing, then both the picture and
* audio queues are waiting for more data. Make them stop
* waiting and terminate normally.
*/
SDL_CondSignal(is->audioq.cond);
SDL_CondSignal(is->videoq.cond);
SDL_Quit();
exit(0);
break;
Expand Down

0 comments on commit 3f4cc09

Please sign in to comment.