From ca689b36373e820c26caa4c1b34679ca1a6038be Mon Sep 17 00:00:00 2001 From: James Stembridge Date: Mon, 9 Feb 2004 22:13:54 +0000 Subject: Only read frame duration when BUF_FLAG_FRAMERATE is set CVS patchset: 6127 CVS date: 2004/02/09 22:13:54 --- src/libxvid/xine_decoder.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/libxvid') diff --git a/src/libxvid/xine_decoder.c b/src/libxvid/xine_decoder.c index 6acecf747..f8856edaa 100644 --- a/src/libxvid/xine_decoder.c +++ b/src/libxvid/xine_decoder.c @@ -85,13 +85,18 @@ static void xvid_decode_data (video_decoder_t *this_gen, buf_element_t *buf) { lprintf ("processing packet type = %08x, buf: %08x, buf->decoder_flags=%08x\n", buf->type, buf, buf->decoder_flags); + if (buf->decoder_flags & BUF_FLAG_FRAMERATE) { + this->frame_duration = buf->decoder_info[0]; + _x_stream_info_set(this->stream, XINE_STREAM_INFO_FRAME_DURATION, + this->video_step); + } + if (buf->decoder_flags & BUF_FLAG_STDHEADER) { xine_bmiheader *bih; XVID_DEC_PARAM xparam; /* initialize data describing video stream */ bih = (xine_bmiheader *) buf->content; - this->frame_duration = buf->decoder_info[1]; this->frame_width = bih->biWidth; this->frame_height = bih->biHeight; this->ratio = (double)bih->biWidth/(double)bih->biHeight; -- cgit v1.2.3