From a206b6f2843fb8d26afa63a9b80af2ea7a55b3d2 Mon Sep 17 00:00:00 2001 From: Thibaut Mattern Date: Mon, 28 Oct 2002 07:53:52 +0000 Subject: New way to handle streams with invalid img_duration (eg some mpeg streams). The concept in simple : compute duration using pts. Here the formula : duration = ( pts - last_pts ) / (nb img between the 2 pts) I've tested with libmpeg2 and ffmpeg. It works. CVS patchset: 3061 CVS date: 2002/10/28 07:53:52 --- src/xine-engine/metronom.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/xine-engine/metronom.h') diff --git a/src/xine-engine/metronom.h b/src/xine-engine/metronom.h index 77ec59614..8baeece10 100644 --- a/src/xine-engine/metronom.h +++ b/src/xine-engine/metronom.h @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: metronom.h,v 1.37 2002/10/14 15:47:39 guenter Exp $ + * $Id: metronom.h,v 1.38 2002/10/28 07:53:52 tmattern Exp $ * * metronom: general pts => virtual calculation/assoc * @@ -246,6 +246,11 @@ struct metronom_s { int allow_full_ao_fill_gap; int force_audio_jump; + + int64_t img_duration; + int img_cpt; + int64_t last_video_pts; + }; metronom_t *metronom_init (int have_audio, xine_stream_t *stream); -- cgit v1.2.3