Fix a race between the start callback and the first frame's data

This commit is contained in:
Cameron Gutman 2014-06-29 21:07:07 -07:00
parent 5c70cf9b3a
commit 18405f576d

View File

@ -179,12 +179,14 @@ int startVideoStream(void* rendererContext, int drFlags) {
return err;
}
// This must be called before the decoder thread starts submitting
// decode units
callbacks.start();
err = PltCreateThread(DecoderThreadProc, NULL, &decoderThread);
if (err != 0) {
return err;
}
callbacks.start();
return 0;
}