Mercurial > mplayer.hg
comparison libmpdemux/tvi_v4l2.c @ 11997:48b5bfb25dc0
missing video thread shutdown, frame count rounding fix
author | henry |
---|---|
date | Wed, 25 Feb 2004 11:52:40 +0000 |
parents | f531170db832 |
children | c941a2362911 |
comparison
equal
deleted
inserted
replaced
11996:398c24cecdc7 | 11997:48b5bfb25dc0 |
---|---|
783 static int uninit(priv_t *priv) | 783 static int uninit(priv_t *priv) |
784 { | 784 { |
785 int i, frames, dropped = 0; | 785 int i, frames, dropped = 0; |
786 | 786 |
787 priv->shutdown = 1; | 787 priv->shutdown = 1; |
788 pthread_join(priv->video_grabber_thread, NULL); | |
788 pthread_mutex_destroy(&priv->video_buffer_mutex); | 789 pthread_mutex_destroy(&priv->video_buffer_mutex); |
789 | 790 |
790 if (priv->streamon) { | 791 if (priv->streamon) { |
791 struct v4l2_buffer buf; | 792 struct v4l2_buffer buf; |
792 | 793 |
793 /* get performance */ | 794 /* get performance */ |
794 frames = 1 + (priv->curr_frame - priv->first_frame) * | 795 frames = 1 + (priv->curr_frame - priv->first_frame + |
796 priv->standard.frameperiod.numerator * 500000 / | |
797 priv->standard.frameperiod.denominator) * | |
795 priv->standard.frameperiod.denominator / | 798 priv->standard.frameperiod.denominator / |
796 priv->standard.frameperiod.numerator / 1000000; | 799 priv->standard.frameperiod.numerator / 1000000; |
797 dropped = frames - priv->frames; | 800 dropped = frames - priv->frames; |
798 | 801 |
799 /* turn off streaming */ | 802 /* turn off streaming */ |