diff options
Diffstat (limited to 'src/demuxers')
-rw-r--r-- | src/demuxers/demux_avi.c | 4 | ||||
-rw-r--r-- | src/demuxers/demux_elem.c | 4 | ||||
-rw-r--r-- | src/demuxers/demux_mpeg.c | 15 | ||||
-rw-r--r-- | src/demuxers/demux_mpeg_block.c | 13 | ||||
-rw-r--r-- | src/demuxers/demux_mpgaudio.c | 4 |
5 files changed, 21 insertions, 19 deletions
diff --git a/src/demuxers/demux_avi.c b/src/demuxers/demux_avi.c index c22a0c2b7..729a301b8 100644 --- a/src/demuxers/demux_avi.c +++ b/src/demuxers/demux_avi.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_avi.c,v 1.10 2001/05/28 12:08:20 f1rmb Exp $ + * $Id: demux_avi.c,v 1.11 2001/05/30 02:09:24 f1rmb Exp $ * * demultiplexer for avi streams * @@ -732,7 +732,7 @@ static int demux_avi_next (demux_avi_t *this) { return 0; } - buf->input_pos = this->input->seek (this->input, 0, SEEK_CUR); + buf->input_pos = this->input->get_current_pos(this->input); switch (this->avi->a_fmt) { case 0x01: diff --git a/src/demuxers/demux_elem.c b/src/demuxers/demux_elem.c index 265ba20e5..e342b482c 100644 --- a/src/demuxers/demux_elem.c +++ b/src/demuxers/demux_elem.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_elem.c,v 1.8 2001/05/28 12:08:20 f1rmb Exp $ + * $Id: demux_elem.c,v 1.9 2001/05/30 02:09:24 f1rmb Exp $ * * demultiplexer for elementary mpeg streams * @@ -73,7 +73,7 @@ static int demux_mpeg_elem_next (demux_mpeg_elem_t *this) { buf->DTS = 0; buf->PTS = 0; - buf->input_pos = this->input->seek(this->input, 0, SEEK_CUR); + buf->input_pos = this->input->get_current_pos(this->input); buf->type = BUF_VIDEO_MPEG; this->video_fifo->put(this->video_fifo, buf); diff --git a/src/demuxers/demux_mpeg.c b/src/demuxers/demux_mpeg.c index c1919494c..29cfcee05 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.12 2001/05/28 12:08:20 f1rmb Exp $ + * $Id: demux_mpeg.c,v 1.13 2001/05/30 02:09:24 f1rmb Exp $ * * demultiplexer for mpeg 1/2 program streams * reads streams of variable blocksizes @@ -67,6 +67,7 @@ static uint32_t read_bytes (demux_mpeg_t *this, int n) { buf[4]=0; + i = this->input->read (this->input, buf, n); if (i != n) { @@ -200,7 +201,7 @@ static void parse_mpeg2_packet (demux_mpeg_t *this, int nID) { buf->type = BUF_AUDIO_MPEG + track; buf->PTS = pts; buf->DTS = 0; /* FIXME */ - buf->input_pos = this->input->seek (this->input, 0, SEEK_CUR); + buf->input_pos = this->input->get_current_pos(this->input); if(this->audio_fifo) this->audio_fifo->put (this->audio_fifo, buf); @@ -246,6 +247,7 @@ static void parse_mpeg2_packet (demux_mpeg_t *this, int nID) { buf->type = BUF_VIDEO_MPEG; buf->PTS = pts; buf->DTS = 0; + buf->input_pos = this->input->get_current_pos(this->input); this->video_fifo->put (this->video_fifo, buf); @@ -359,7 +361,7 @@ static void parse_mpeg1_packet (demux_mpeg_t *this, int nID) buf->type = BUF_AUDIO_MPEG + track ; buf->PTS = pts; buf->DTS = 0; /* FIXME */ - buf->input_pos = this->input->seek (this->input, 0, SEEK_CUR); + buf->input_pos = this->input->get_current_pos(this->input); if(this->audio_fifo) this->audio_fifo->put (this->audio_fifo, buf); @@ -368,7 +370,8 @@ static void parse_mpeg1_packet (demux_mpeg_t *this, int nID) xprintf (VERBOSE|DEMUX|VIDEO, ", video #%d", nID & 0x0f); - buf = this->input->read_block (this->input, this->video_fifo, nLen); + if(this->input->read_block) + buf = this->input->read_block (this->input, this->video_fifo, nLen); if (buf == NULL) { this->status = DEMUX_FINISHED; @@ -377,6 +380,7 @@ static void parse_mpeg1_packet (demux_mpeg_t *this, int nID) buf->type = BUF_VIDEO_MPEG; buf->PTS = pts; buf->DTS = 0; /* FIXME */ + buf->input_pos = this->input->get_current_pos(this->input); this->video_fifo->put (this->video_fifo, buf); @@ -611,8 +615,7 @@ static int demux_mpeg_open(demux_plugin_t *this_gen, if(media) { if((!(strncasecmp(MRL, "stdin", 5))) || (!(strncasecmp(MRL, "fifo", 4)))) { - if(!(strncasecmp((media+3), "mpeg1", 5))) { - perr("%s(%d)mpeg\n", __FUNCTION__, stage); + if(!(strncasecmp(media+3, "mpeg1", 5))) { this->input = input; return DEMUX_CAN_HANDLE; } diff --git a/src/demuxers/demux_mpeg_block.c b/src/demuxers/demux_mpeg_block.c index 2c23f5d3a..2abc7119d 100644 --- a/src/demuxers/demux_mpeg_block.c +++ b/src/demuxers/demux_mpeg_block.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_block.c,v 1.8 2001/05/28 12:08:20 f1rmb Exp $ + * $Id: demux_mpeg_block.c,v 1.9 2001/05/30 02:09:24 f1rmb Exp $ * * demultiplexer for mpeg 1/2 program streams * @@ -223,7 +223,7 @@ static void demux_mpeg_block_parse_pack (demux_mpeg_block_t *this) { buf->type = BUF_SPU_PACKAGE + nSPUID; buf->PTS = nPTS; buf->DTS = nDTS ; - buf->input_pos = this->input->seek (this->input, 0, SEEK_CUR); + buf->input_pos = this->input->get_current_pos(this->input); this->spu_fifo->put (this->spu_fifo, buf); @@ -240,7 +240,7 @@ static void demux_mpeg_block_parse_pack (demux_mpeg_block_t *this) { buf->type = BUF_AUDIO_AC3 + nTrack; buf->PTS = nPTS; buf->DTS = nDTS ; - buf->input_pos = this->input->seek (this->input, 0, SEEK_CUR); + buf->input_pos = this->input->get_current_pos(this->input); if(this->audio_fifo) this->audio_fifo->put (this->audio_fifo, buf); @@ -264,7 +264,7 @@ static void demux_mpeg_block_parse_pack (demux_mpeg_block_t *this) { buf->type = BUF_AUDIO_LPCM + nTrack; buf->PTS = nPTS; buf->DTS = nDTS ; - buf->input_pos = this->input->seek (this->input, 0, SEEK_CUR); + buf->input_pos = this->input->get_current_pos(this->input); if(this->audio_fifo) this->audio_fifo->put (this->audio_fifo, buf); @@ -281,7 +281,7 @@ static void demux_mpeg_block_parse_pack (demux_mpeg_block_t *this) { buf->type = BUF_VIDEO_MPEG; buf->PTS = nPTS; buf->DTS = nDTS; - buf->input_pos = this->input->seek (this->input, 0, SEEK_CUR); + buf->input_pos = this->input->get_current_pos(this->input); this->video_fifo->put (this->video_fifo, buf); @@ -299,7 +299,7 @@ static void demux_mpeg_block_parse_pack (demux_mpeg_block_t *this) { buf->type = BUF_AUDIO_MPEG + nTrack; buf->PTS = nPTS; buf->DTS = nDTS; - buf->input_pos = this->input->seek (this->input, 0, SEEK_CUR); + buf->input_pos = this->input->get_current_pos(this->input); if(this->audio_fifo) this->audio_fifo->put (this->audio_fifo, buf); @@ -461,7 +461,6 @@ static int demux_mpeg_block_open(demux_plugin_t *this_gen, media = strstr(MRL, "://"); if(media) { if(!strncmp(MRL, "dvd", 3) - || !strncmp(MRL, "fifo", 4) || (((!strncmp(MRL, "stdin", 5) || !strncmp(MRL, "fifo", 4)) && (!strncmp((media+3), "mpeg2", 5) ))) ) { diff --git a/src/demuxers/demux_mpgaudio.c b/src/demuxers/demux_mpgaudio.c index e362b5332..9ddaa8d11 100644 --- a/src/demuxers/demux_mpgaudio.c +++ b/src/demuxers/demux_mpgaudio.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_mpgaudio.c,v 1.7 2001/05/28 12:08:20 f1rmb Exp $ + * $Id: demux_mpgaudio.c,v 1.8 2001/05/30 02:09:24 f1rmb Exp $ * * demultiplexer for mpeg audio (i.e. mp3) streams * @@ -240,7 +240,7 @@ static int demux_mpgaudio_next (demux_mpgaudio_t *this) { buf->DTS = 0; buf->PTS = 0; - buf->input_pos = this->input->seek(this->input, 0, SEEK_CUR); + buf->input_pos = this->input->get_current_pos(this->input); buf->type = BUF_AUDIO_AVI; if(this->audio_fifo) |