mirror of https://github.com/mpv-player/mpv
Clear subs in broken OGM files (those without empty subtitle packets) a bit later in order to avoid flickering if there are more subs following immediately. Patch by Michael Reinsch <mr at uue adot org>
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@12265 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
a965ebf6b2
commit
3d2d5a763f
|
@ -241,7 +241,7 @@ void demux_ogg_add_sub (ogg_stream_t* os,ogg_packet* pack) {
|
|||
if(pack->granulepos == -1)
|
||||
pack->granulepos = os->lastpos + os->lastsize;
|
||||
pts = (float)pack->granulepos/(float)os->samplerate;
|
||||
clear_sub = 0.001 + pts + (float)duration/1000.0;
|
||||
clear_sub = 1.0 + pts + (float)duration/1000.0;
|
||||
}
|
||||
while (1) {
|
||||
int c = packet[lcv++];
|
||||
|
|
Loading…
Reference in New Issue