[MPlayer-cvslog] r27250 - in trunk/libmpdemux: demux_audio.c demux_lavf.c
reimar
subversion at mplayerhq.hu
Fri Jul 11 19:25:38 CEST 2008
Author: reimar
Date: Fri Jul 11 19:25:37 2008
New Revision: 27250
Log:
Correct stream-seekability tests in demux_audio and demux_lavf
Based on a patch by Alexander Kanavin (alexander.kanavin nokia com)
Modified:
trunk/libmpdemux/demux_audio.c
trunk/libmpdemux/demux_lavf.c
Modified: trunk/libmpdemux/demux_audio.c
==============================================================================
--- trunk/libmpdemux/demux_audio.c (original)
+++ trunk/libmpdemux/demux_audio.c Fri Jul 11 19:25:37 2008
@@ -329,7 +329,7 @@ static int demux_audio_open(demuxer_t* d
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);
Modified: trunk/libmpdemux/demux_lavf.c
==============================================================================
--- trunk/libmpdemux/demux_lavf.c (original)
+++ trunk/libmpdemux/demux_lavf.c Fri Jul 11 19:25:37 2008
@@ -454,7 +454,7 @@ static demuxer_t* demux_open_lavf(demuxe
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");
More information about the MPlayer-cvslog
mailing list