diff options
| author | Siggi Langauf <siggi@users.sourceforge.net> | 2002-06-20 00:21:51 +0000 | 
|---|---|---|
| committer | Siggi Langauf <siggi@users.sourceforge.net> | 2002-06-20 00:21:51 +0000 | 
| commit | 24b7943016185571c079ea4a0e52588074540eeb (patch) | |
| tree | 8b0fd0dd2c0974f23fc41a01c4cbb44b2fa1862b /src | |
| parent | 4a8716aa01b5a91f82b6b6af1f0576e7b307e471 (diff) | |
| download | xine-lib-24b7943016185571c079ea4a0e52588074540eeb.tar.gz xine-lib-24b7943016185571c079ea4a0e52588074540eeb.tar.bz2 | |
an attempt do be more defensive when trying to play AVI via http.
Still segfaults playing http://gewurtz.mit.edu/videos/Aggressive.avi, though
CVS patchset: 2101
CVS date: 2002/06/20 00:21:51
Diffstat (limited to 'src')
| -rw-r--r-- | src/demuxers/demux_avi.c | 8 | ||||
| -rw-r--r-- | src/input/input_http.c | 10 | 
2 files changed, 16 insertions, 2 deletions
| diff --git a/src/demuxers/demux_avi.c b/src/demuxers/demux_avi.c index 9cca600b1..d87037aa7 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.95 2002/06/12 12:22:32 f1rmb Exp $ + * $Id: demux_avi.c,v 1.96 2002/06/20 00:21:52 siggi Exp $   *   * demultiplexer for avi streams   * @@ -1449,6 +1449,12 @@ static int demux_avi_open(demux_plugin_t *this_gen,                            input_plugin_t *input, int stage) {    demux_avi_t *this = (demux_avi_t *) this_gen; +  printf ("demux_avi: input capabilities = %d\n", +	  input->get_capabilities(input)); +  if (! (input->get_capabilities(input) & INPUT_CAP_SEEKABLE)) { +    printf("demux_avi.c: not seekable, can't handle!\n"); +    return DEMUX_CANNOT_HANDLE; +  }    switch(stage) { diff --git a/src/input/input_http.c b/src/input/input_http.c index 996c2bd9b..ec60a0ff8 100644 --- a/src/input/input_http.c +++ b/src/input/input_http.c @@ -607,6 +607,14 @@ static off_t http_plugin_get_current_pos (input_plugin_t *this_gen){    return this->curpos;  } +static off_t http_plugin_seek(input_plugin_t *this_gen, +			      off_t offset, int origin) { + +  http_input_plugin_t *this = (http_input_plugin_t *) this_gen; +  /* dummy implementation: don't seek, just return current position */ +  return this->curpos; +} +  static int http_plugin_eject_media (input_plugin_t *this_gen) {    return 1;  } @@ -687,7 +695,7 @@ input_plugin_t *init_input_plugin (int iface, xine_t *xine) {    this->input_plugin.open              = http_plugin_open;    this->input_plugin.read              = http_plugin_read;    this->input_plugin.read_block        = http_plugin_read_block; -  this->input_plugin.seek              = NULL; +  this->input_plugin.seek              = http_plugin_seek;    this->input_plugin.get_current_pos   = http_plugin_get_current_pos;    this->input_plugin.get_length        = http_plugin_get_length;    this->input_plugin.get_blocksize     = http_plugin_get_blocksize; | 
