diff options
author | Rich J Wareham <richwareham@users.sourceforge.net> | 2001-10-22 22:50:01 +0000 |
---|---|---|
committer | Rich J Wareham <richwareham@users.sourceforge.net> | 2001-10-22 22:50:01 +0000 |
commit | 89be3dd0e40052c80da727c2b2cd763114d3704c (patch) | |
tree | dbb8af67618823bb6afbf4ff0d86d6d692f57fb6 | |
parent | fc016dc4ca3b5d4c2b2fa2f990148bbb0a6818c2 (diff) | |
download | xine-lib-89be3dd0e40052c80da727c2b2cd763114d3704c.tar.gz xine-lib-89be3dd0e40052c80da727c2b2cd763114d3704c.tar.bz2 |
Some modification for seeking in unpredictable streams (like DVDs)
CVS patchset: 861
CVS date: 2001/10/22 22:50:01
-rw-r--r-- | src/demuxers/demux_mpeg_block.c | 10 | ||||
-rw-r--r-- | src/input/input_plugin.h | 3 |
2 files changed, 8 insertions, 5 deletions
diff --git a/src/demuxers/demux_mpeg_block.c b/src/demuxers/demux_mpeg_block.c index 4d783924c..b8d0fc7ea 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.57 2001/10/21 15:04:13 jcdutton Exp $ + * $Id: demux_mpeg_block.c,v 1.58 2001/10/22 22:50:01 richwareham Exp $ * * demultiplexer for mpeg 1/2 program streams * @@ -362,7 +362,7 @@ static void demux_mpeg_block_parse_pack (demux_mpeg_block_t *this, int preview_m buf->content = p+4; buf->size = packet_len-4; if (track & 0x8) - buf->type = BUF_AUDIO_DTS + track & 0x07; /* DVDs only have 8 tracks */ + buf->type = BUF_AUDIO_DTS + (track & 0x07); /* DVDs only have 8 tracks */ else buf->type = BUF_AUDIO_A52 + track; buf->PTS = PTS; @@ -545,7 +545,8 @@ static int demux_mpeg_block_estimate_rate (demux_mpeg_block_t *this) { int count; int stream_id; - if (!(this->input->get_capabilities(this->input) & INPUT_CAP_SEEKABLE)) + if (!(this->input->get_capabilities(this->input) & INPUT_CAP_SEEKABLE) || + (this->input->get_capabilities(this->input) & INPUT_CAP_VARIABLE_BITRATE)) return 0; last_pos = 0; @@ -829,7 +830,8 @@ static int demux_mpeg_block_open(demux_plugin_t *this_gen, case STAGE_BY_CONTENT: { - if((input->get_capabilities(input) & INPUT_CAP_SEEKABLE) != 0) { + if(((input->get_capabilities(input) & INPUT_CAP_SEEKABLE) != 0) && + ((input->get_capabilities(input) & INPUT_CAP_VARIABLE_BITRATE) == 0) ) { this->blocksize = input->get_blocksize(input); diff --git a/src/input/input_plugin.h b/src/input/input_plugin.h index b00b501d4..eb9a597c3 100644 --- a/src/input/input_plugin.h +++ b/src/input/input_plugin.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: input_plugin.h,v 1.15 2001/10/20 02:01:51 guenter Exp $ + * $Id: input_plugin.h,v 1.16 2001/10/22 22:50:01 richwareham Exp $ */ #ifndef HAVE_INPUT_PLUGIN_H @@ -291,6 +291,7 @@ struct input_plugin_s #define INPUT_CAP_CLUT 0x00000020 #define INPUT_CAP_AUDIOLANG 0x00000040 #define INPUT_CAP_SPULANG 0x00000080 +#define INPUT_CAP_VARIABLE_BITRATE 0x00000100 #define INPUT_OPTIONAL_UNSUPPORTED 0 |