summaryrefslogtreecommitdiff
path: root/src/libdivx4
diff options
context:
space:
mode:
authorJames Stembridge <jstembridge@users.sourceforge.net>2004-02-09 22:13:54 +0000
committerJames Stembridge <jstembridge@users.sourceforge.net>2004-02-09 22:13:54 +0000
commitca689b36373e820c26caa4c1b34679ca1a6038be (patch)
tree48dd691f480fcb859ef4cbd1fdf9da3c0e22fed5 /src/libdivx4
parent5fbef27bfd3bbb0a391332836d3813b6f0186d74 (diff)
downloadxine-lib-ca689b36373e820c26caa4c1b34679ca1a6038be.tar.gz
xine-lib-ca689b36373e820c26caa4c1b34679ca1a6038be.tar.bz2
Only read frame duration when BUF_FLAG_FRAMERATE is set
CVS patchset: 6127 CVS date: 2004/02/09 22:13:54
Diffstat (limited to 'src/libdivx4')
-rw-r--r--src/libdivx4/xine_decoder.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/libdivx4/xine_decoder.c b/src/libdivx4/xine_decoder.c
index b5fe974d4..7b9941ee9 100644
--- a/src/libdivx4/xine_decoder.c
+++ b/src/libdivx4/xine_decoder.c
@@ -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: xine_decoder.c,v 1.49 2004/01/09 01:26:33 miguelfreitas Exp $
+ * $Id: xine_decoder.c,v 1.50 2004/02/09 22:13:54 jstembridge Exp $
*
* xine decoder plugin using divx4
*
@@ -224,7 +224,6 @@ static int divx4_init_decoder(divx4_decoder_t *this, buf_element_t *buf) {
lprintf ("init_decoder\n");
memcpy ( &this->bih, buf->content, sizeof (xine_bmiheader));
- this->video_step = buf->decoder_info[1];
codec_type = buf->type & 0xFFFF0000;
@@ -408,8 +407,10 @@ static void divx4_decode_data (video_decoder_t *this_gen, buf_element_t *buf) {
xine_fast_memcpy (&this->buf[this->size], buf->content, buf->size);
this->size += buf->size;
- if (buf->decoder_flags & BUF_FLAG_FRAMERATE)
+ if (buf->decoder_flags & BUF_FLAG_FRAMERATE) {
this->video_step = buf->decoder_info[0];
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_FRAME_DURATION, this->video_step);
+ }
if (buf->decoder_flags & BUF_FLAG_FRAME_END) { /* need to decode a frame */
/* allocate image (taken from ffmpeg plugin) */