[MPlayer-dev-eng] [PATCH] demux_ogg -audiofile fix (bug #375)
Reimar Döffinger
Reimar.Doeffinger at stud.uni-karlsruhe.de
Sun Oct 30 12:18:30 CET 2005
Hi,
sorry, this contained unrelated changes, so another try (hopefully the
last :-) )
-------------- next part --------------
Index: libmpdemux/demux_ogg.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demux_ogg.c,v
retrieving revision 1.81
diff -u -r1.81 demux_ogg.c
--- libmpdemux/demux_ogg.c 30 Oct 2005 09:19:05 -0000 1.81
+++ libmpdemux/demux_ogg.c 30 Oct 2005 11:13:43 -0000
@@ -554,8 +554,6 @@
if (ds == d->video && ((sh_audio_t*)ds->sh)->format == FOURCC_THEORA)
context = ((sh_video_t *)ds->sh)->context;
data = demux_ogg_read_packet(os,pack,context,&pts,&flags,samplesize);
- if(d->video->id < 0)
- ((sh_audio_t*)ds->sh)->delay = pts;
/// Clear subtitles if necessary (for broken files)
if ((clear_sub > 0) && (pts >= clear_sub)) {
@@ -1471,7 +1469,8 @@
}
}
if (pos < 0) pos = 0;
- if (pos > (demuxer->movi_end - demuxer->movi_start)) return;
+ if (pos > (demuxer->movi_end - demuxer->movi_start))
+ pos = demuxer->movi_end - demuxer->movi_start;
} // if(ogg_d->syncpoints)
while(1) {
@@ -1500,8 +1499,8 @@
char* buf = ogg_sync_buffer(sync,BLOCK_SIZE);
int len = stream_read(demuxer->stream,buf,BLOCK_SIZE);
if(len == 0 && demuxer->stream->eof) {
- mp_msg(MSGT_DEMUX,MSGL_ERR,"EOF while trying to seek !!!!\n");
- break;
+ mp_msg(MSGT_DEMUX,MSGL_V,"EOF while trying to seek !!!!\n");
+ return;
}
ogg_sync_wrote(sync,len);
continue;
@@ -1556,6 +1555,8 @@
vo_osd_changed(OSDTYPE_SUBTITLE);
clear_sub = -1;
demux_ogg_add_packet(ds,os,ds->id,&op);
+ if (demuxer->video->id < 0)
+ sh_audio->delay = pts;
return;
}
}
More information about the MPlayer-dev-eng
mailing list