summaryrefslogtreecommitdiff
path: root/src/demuxers
diff options
context:
space:
mode:
authorDarren Salt <linux@youmustbejoking.demon.co.uk>2010-01-21 03:34:46 +0000
committerDarren Salt <linux@youmustbejoking.demon.co.uk>2010-01-21 03:34:46 +0000
commitca6d300b39eb9a8bb31de2e33b03ecf96e2e0b60 (patch)
tree6e7945d259b295ace8161791769bded15b55997b /src/demuxers
parent85bd1c93b079c8b42362111efda3bbfab207d149 (diff)
parentf82784e051769a6674639aa0e5080430b4ceaf21 (diff)
downloadxine-lib-ca6d300b39eb9a8bb31de2e33b03ecf96e2e0b60.tar.gz
xine-lib-ca6d300b39eb9a8bb31de2e33b03ecf96e2e0b60.tar.bz2
Merge from 1.1.
Diffstat (limited to 'src/demuxers')
-rw-r--r--src/demuxers/demux_ts.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/demuxers/demux_ts.c b/src/demuxers/demux_ts.c
index 8c8250cf4..60ff2cbcb 100644
--- a/src/demuxers/demux_ts.c
+++ b/src/demuxers/demux_ts.c
@@ -973,6 +973,7 @@ static void demux_ts_buffer_pes(demux_ts_t*this, unsigned char *ts,
m->buf->decoder_flags |= BUF_FLAG_FRAME_END;
}
m->buf->pts = m->pts;
+ m->pts = 0;
m->buf->decoder_info[0] = 1;
if( this->input->get_length (this->input) )
@@ -981,12 +982,12 @@ static void demux_ts_buffer_pes(demux_ts_t*this, unsigned char *ts,
if (this->rate)
m->buf->extra_info->input_time = (int)((int64_t)this->input->get_current_pos (this->input)
* 1000 / (this->rate * 50));
+#ifdef TS_LOG
+ printf ("demux_ts: produced buffer, pts=%lld\n", m->buf->pts);
+#endif
m->fifo->put(m->fifo, m->buf);
m->buffered_bytes = 0;
m->buf = NULL; /* forget about buf -- not our responsibility anymore */
-#ifdef TS_LOG
- printf ("demux_ts: produced buffer, pts=%lld\n", m->pts);
-#endif
}
/* allocate the buffer here, as pes_header needs a valid buf for dvbsubs */
m->buf = m->fifo->buffer_pool_alloc(m->fifo);
@@ -1019,6 +1020,7 @@ static void demux_ts_buffer_pes(demux_ts_t*this, unsigned char *ts,
m->buf->size = m->buffered_bytes;
m->buf->type = m->type;
m->buf->pts = m->pts;
+ m->pts = 0;
m->buf->decoder_info[0] = 1;
if( this->input->get_length (this->input) )
m->buf->extra_info->input_normpos = (int)( (double) this->input->get_current_pos (this->input) *
@@ -1026,15 +1028,12 @@ static void demux_ts_buffer_pes(demux_ts_t*this, unsigned char *ts,
if (this->rate)
m->buf->extra_info->input_time = (int)((int64_t)this->input->get_current_pos (this->input)
* 1000 / (this->rate * 50));
-
+#ifdef TS_LOG
+ printf ("demux_ts: produced buffer, pts=%lld\n", m->buf->pts);
+#endif
m->fifo->put(m->fifo, m->buf);
m->buffered_bytes = 0;
m->buf = m->fifo->buffer_pool_alloc(m->fifo);
-
-#ifdef TS_LOG
- printf ("demux_ts: produced buffer, pts=%lld\n", m->pts);
-#endif
-
}
memcpy(m->buf->mem + m->buffered_bytes, ts, len);
m->buffered_bytes += len;