diff options
author | Heiko Schaefer <heikos@users.sourceforge.net> | 2001-11-13 21:47:57 +0000 |
---|---|---|
committer | Heiko Schaefer <heikos@users.sourceforge.net> | 2001-11-13 21:47:57 +0000 |
commit | 96056accd3b60b48527d521b85a3d50d78d3d42f (patch) | |
tree | fc93f084460362a7c1fd4162ef1957fd9caefccb /src/demuxers/demux_mpeg.c | |
parent | 40ff01806b091bd7c5419d8f411906d504d33252 (diff) | |
download | xine-lib-96056accd3b60b48527d521b85a3d50d78d3d42f.tar.gz xine-lib-96056accd3b60b48527d521b85a3d50d78d3d42f.tar.bz2 |
metronom logic changed
CVS patchset: 1030
CVS date: 2001/11/13 21:47:57
Diffstat (limited to 'src/demuxers/demux_mpeg.c')
-rw-r--r-- | src/demuxers/demux_mpeg.c | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/src/demuxers/demux_mpeg.c b/src/demuxers/demux_mpeg.c index 67de987c3..8ee0109e5 100644 --- a/src/demuxers/demux_mpeg.c +++ b/src/demuxers/demux_mpeg.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: demux_mpeg.c,v 1.42 2001/11/10 13:48:02 guenter Exp $ + * $Id: demux_mpeg.c,v 1.43 2001/11/13 21:47:57 heikos Exp $ * * demultiplexer for mpeg 1/2 program streams * reads streams of variable blocksizes @@ -519,6 +519,29 @@ static uint32_t parse_pack(demux_mpeg_t *this) { buf = read_bytes (this, 3) ; } + /* discontinuity ? */ + { + int32_t scr_diff = scr - this->last_scr; + if (abs(scr_diff) > 60000) { + + buf_element_t *buf; + + buf = this->video_fifo->buffer_pool_alloc (this->video_fifo); + buf->type = BUF_CONTROL_AVSYNC_RESET; + buf->SCR = scr; + this->video_fifo->put (this->video_fifo, buf); + + if (this->audio_fifo) { + buf = this->audio_fifo->buffer_pool_alloc (this->audio_fifo); + buf->type = BUF_CONTROL_AVSYNC_RESET; + buf->SCR = scr; + this->audio_fifo->put (this->audio_fifo, buf); + } + } + this->last_scr = scr; + } + + /* system header */ buf = read_bytes (this, 4) ; |