mirror of
https://github.com/mpv-player/mpv
synced 2025-02-14 19:07:14 +00:00
missing video thread shutdown, frame count rounding fix
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@11998 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
6332d6bbe9
commit
33832d42e1
@ -785,13 +785,16 @@ static int uninit(priv_t *priv)
|
|||||||
int i, frames, dropped = 0;
|
int i, frames, dropped = 0;
|
||||||
|
|
||||||
priv->shutdown = 1;
|
priv->shutdown = 1;
|
||||||
|
pthread_join(priv->video_grabber_thread, NULL);
|
||||||
pthread_mutex_destroy(&priv->video_buffer_mutex);
|
pthread_mutex_destroy(&priv->video_buffer_mutex);
|
||||||
|
|
||||||
if (priv->streamon) {
|
if (priv->streamon) {
|
||||||
struct v4l2_buffer buf;
|
struct v4l2_buffer buf;
|
||||||
|
|
||||||
/* get performance */
|
/* get performance */
|
||||||
frames = 1 + (priv->curr_frame - priv->first_frame) *
|
frames = 1 + (priv->curr_frame - priv->first_frame +
|
||||||
|
priv->standard.frameperiod.numerator * 500000 /
|
||||||
|
priv->standard.frameperiod.denominator) *
|
||||||
priv->standard.frameperiod.denominator /
|
priv->standard.frameperiod.denominator /
|
||||||
priv->standard.frameperiod.numerator / 1000000;
|
priv->standard.frameperiod.numerator / 1000000;
|
||||||
dropped = frames - priv->frames;
|
dropped = frames - priv->frames;
|
||||||
|
Loading…
Reference in New Issue
Block a user