<div dir="ltr">Hi Julian,<div><br></div><div>Thanks for taking the time to answer. I will make some test with a DVD that includes subtitles. Any ideas about other format that should be tested as well ? </div><div>My impression however is that concerning format like DVD where the subtitles are muxed into the stream, there should really never be any need to delay the subtitles : if the subtitles were out of sync on a dvd, it would means that the DVD is garbage anyway.</div>
<div><br></div><div>Concerning the tooltip I will make it a separate patch.</div><div><br></div><div>I might take me a few days before I can post a corrected set of patches.</div><div><br></div><div>Regards,</div><div><br>
</div><div>Pascal Thomet</div><div><br><div><br></div><div><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, Jun 1, 2014 at 10:47 AM, Julian Scheel <span dir="ltr"><<a href="mailto:julian@jusst.de" target="_blank">julian@jusst.de</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Am 30/05/14 22:04, schrieb Pascal Thomet:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
This is a follow-up to a patch I made last year<br>
(<u></u>f7211d5efa4cd9ef392230d85fdf34<u></u>70edefab39)<br>
When developping it I stumbled upon a prexisting bug that I could<br>
not correct at that time.<br>
<br>
I now propose a correction for this bug, as well as tooltip that better<br>
explain the use of the hotkeys introduced by f7211d5efa4cd9ef392230d85fdf34<u></u>70edefab39<br>
<br>
tests passed / compile and runs correctly in debug & release modes<br>
under linux & OSX<br>
<br>
1) Bug correction info :<br>
*  *  *  *  *  *  *  *  *<br>
<br>
Bug reproduction step : *under linux* (will not happen under OSX)<br>
- launch a video that has a subtitle,<br>
- press Shift-H ("bookmark audio time"),<br>
- wait 5 seconds<br>
- press Shift-J ("bookmark subtitle time")<br>
- press Shift-K ("sync bookmarks")<br>
==> the audio is broken...<br>
(AFAIK this bug seems not to be mentioned on <a href="http://trac.videolan.org" target="_blank">trac.videolan.org</a>)<br>
<br>
The subtitle delay ("spu-delay") was previously implemented by<br>
   i) setting a variable spu-delay<br>
      (var_SetTime(... , "spu-delay", ... ))<br>
   ii) this change raised a callback that finaly lead to calling<br>
     UpdatePtsDelay().<br>
<br>
The reason UpdatePtsDelay() was called is that the subtitle delay<br>
was programed the same way as the audio delay (for which it is required<br>
to wait until the audio is actually demuxed)<br>
<br>
*However* the situation for subtitles is quite different, as they are all in memory<br>
(no need to wait until they are demuxed !)<br>
</blockquote>
<br>
This really depends on the subtitle source. In case of dvb subtitles in mpeg ts they are not all in memory but come muxed into the stream.<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
The code is now more simple (and the bug is fixed !) :<br>
- no more delay calculations inside hotkeys.c, everything is handled<br>
   inside subtitle.c through callbacks<br>
- inside subtitle.c :<br>
     * adjust_subtitle_time() receives a subtitle timestamp as input and returns<br>
       that timestamp corrected by spu-delay<br>
     * set_current_subtitle_by_time() is called when spu-delay is changed<br>
<br>
2) Tooltip<br>
*  *  *  *<br>
</blockquote>
<br>
imho this should be split into a separate patch.<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
This adds a tooltip in the "Track Synchronization" window<br>
on the "subtitle track sycnhronization" label and widget.<br>
It explains better the use of the subtitle sync hotkeys<br>
(Shift H/J/K)<br>
<br>
Also tested under Linux & OSX.<br>
---<br></blockquote></blockquote></div></div></div></div>