Skip to content

Commit

Permalink
THEORAPLAY_isDecoding() should return true as long as there is data p…
Browse files Browse the repository at this point in the history
…ending.

Even if the worker thread is done. Otherwise, an app might drop out of a loop
 before the final frames are grabbed.
  • Loading branch information
icculus committed Jun 11, 2011
1 parent 8aa0d1f commit c2522f4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion theoraplay.c
Expand Up @@ -497,7 +497,8 @@ void THEORAPLAY_stopDecode(THEORAPLAY_Decoder *decoder)
int THEORAPLAY_isDecoding(THEORAPLAY_Decoder *decoder)
{
const TheoraDecoder *ctx = (TheoraDecoder *) decoder;
return (ctx && ctx->thread_created && !ctx->thread_done);
return ( ctx && (ctx->audiolist || ctx->videolist ||
(ctx->thread_created && !ctx->thread_done)) );
} // THEORAPLAY_isDecoding


Expand Down

0 comments on commit c2522f4

Please sign in to comment.