summaryrefslogtreecommitdiff
path: root/src/xine-engine
diff options
context:
space:
mode:
Diffstat (limited to 'src/xine-engine')
-rw-r--r--src/xine-engine/buffer.h3
-rw-r--r--src/xine-engine/video_decoder.c4
-rw-r--r--src/xine-engine/xine.c7
-rw-r--r--src/xine-engine/xine_internal.h3
4 files changed, 11 insertions, 6 deletions
diff --git a/src/xine-engine/buffer.h b/src/xine-engine/buffer.h
index 3d70f54c6..0b819494f 100644
--- a/src/xine-engine/buffer.h
+++ b/src/xine-engine/buffer.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: buffer.h,v 1.39 2002/04/09 03:38:01 miguelfreitas Exp $
+ * $Id: buffer.h,v 1.40 2002/04/16 12:27:20 jcdutton Exp $
*
*
* contents:
@@ -150,6 +150,7 @@ struct buf_element_s {
int64_t pts; /* presentation time stamp, used for a/v sync */
int64_t disc_off; /* discontinuity offset */
off_t input_pos; /* remember where this buf came from in the input source */
+ off_t input_length; /* remember the length of the input source */
int input_time;/* time offset in seconds from beginning of stream */
uint32_t decoder_flags; /* stuff like keyframe, is_header ... see below */
diff --git a/src/xine-engine/video_decoder.c b/src/xine-engine/video_decoder.c
index 7bc3d68a1..eae3d1574 100644
--- a/src/xine-engine/video_decoder.c
+++ b/src/xine-engine/video_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: video_decoder.c,v 1.82 2002/04/09 13:53:52 miguelfreitas Exp $
+ * $Id: video_decoder.c,v 1.83 2002/04/16 12:27:20 jcdutton Exp $
*
*/
@@ -80,6 +80,8 @@ void *video_decoder_loop (void *this_gen) {
if (buf->input_pos)
this->cur_input_pos = buf->input_pos;
+ if (buf->input_length)
+ this->cur_input_length = buf->input_length;
if (buf->input_time)
this->cur_input_time = buf->input_time;
diff --git a/src/xine-engine/xine.c b/src/xine-engine/xine.c
index 171026e98..1606c173d 100644
--- a/src/xine-engine/xine.c
+++ b/src/xine-engine/xine.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.c,v 1.118 2002/04/16 11:06:37 jcdutton Exp $
+ * $Id: xine.c,v 1.119 2002/04/16 12:27:20 jcdutton Exp $
*
* top-level xine functions
*
@@ -550,6 +550,7 @@ xine_t *xine_init (vo_driver_t *vo,
this->spu_channel_auto = -1;
this->spu_channel_user = -1;
this->cur_input_pos = 0;
+ this->cur_input_length = 0;
/*
* init and start decoder threads
@@ -641,8 +642,8 @@ int xine_get_current_position (xine_t *this) {
}
/* pos = this->mCurInput->seek (0, SEEK_CUR); */
- len = this->cur_input_plugin->get_length (this->cur_input_plugin);
-
+ len = this->cur_input_length;
+ if (len == 0) len = this->cur_input_plugin->get_length (this->cur_input_plugin);
share = (double) this->cur_input_pos / (double) len * 65535;
pthread_mutex_unlock (&this->xine_lock);
diff --git a/src/xine-engine/xine_internal.h b/src/xine-engine/xine_internal.h
index b54e4dadc..51aef162d 100644
--- a/src/xine-engine/xine_internal.h
+++ b/src/xine-engine/xine_internal.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: xine_internal.h,v 1.76 2002/04/09 04:35:17 miguelfreitas Exp $
+ * $Id: xine_internal.h,v 1.77 2002/04/16 12:27:21 jcdutton Exp $
*
*/
@@ -167,6 +167,7 @@ struct xine_s {
int status;
int speed;
off_t cur_input_pos;
+ off_t cur_input_length;
int cur_input_time;
char cur_mrl[1024];