Mercurial > mplayer.hg
changeset 27218:932d756585cc
Correct stream-seekability tests in demux_audio and demux_lavf
Based on a patch by Alexander Kanavin (alexander.kanavin nokia com)
author | reimar |
---|---|
date | Fri, 11 Jul 2008 17:25:37 +0000 |
parents | 28f249556ecc |
children | ef71399cd7e2 |
files | libmpdemux/demux_audio.c libmpdemux/demux_lavf.c |
diffstat | 2 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/libmpdemux/demux_audio.c Thu Jul 10 20:10:11 2008 +0000 +++ b/libmpdemux/demux_audio.c Fri Jul 11 17:25:37 2008 +0000 @@ -329,7 +329,7 @@ sh_audio->i_bps = sh_audio->wf->nAvgBytesPerSec; free(mp3_found); mp3_found = NULL; - if(s->end_pos) { + if(s->end_pos && (s->flags & STREAM_SEEK) == STREAM_SEEK) { char tag[4]; stream_seek(s,s->end_pos-128); stream_read(s,tag,3);
--- a/libmpdemux/demux_lavf.c Thu Jul 10 20:10:11 2008 +0000 +++ b/libmpdemux/demux_lavf.c Fri Jul 11 17:25:37 2008 +0000 @@ -454,7 +454,7 @@ priv->pb = av_alloc_put_byte(priv->buffer, BIO_BUFFER_SIZE, 0, demuxer->stream, mp_read, NULL, mp_seek); - priv->pb->is_streamed = !demuxer->stream->end_pos; + priv->pb->is_streamed = !demuxer->stream->end_pos || (s->flags & STREAM_SEEK) != STREAM_SEEK; if(av_open_input_stream(&avfc, priv->pb, mp_filename, priv->avif, &ap)<0){ mp_msg(MSGT_HEADER,MSGL_ERR,"LAVF_header: av_open_input_stream() failed\n");