<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Il 15/10/2017 17:32, Jérôme Laheurte ha
      scritto:<br>
    </div>
    <blockquote type="cite"
      cite="mid:674DF071-4FD1-48FD-9375-345F497F7B65@jeromelaheurte.net">
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
      <br class="">
      <div>
        <blockquote type="cite" class="">
          <div class="">Le 15 oct. 2017 à 17:03, Mailing List SVR <<a
              href="mailto:lists@svrinformatica.it" class=""
              moz-do-not-send="true">lists@svrinformatica.it</a>> a
            écrit :</div>
          <br class="Apple-interchange-newline">
          <div class="">
            <div class="moz-cite-prefix" style="font-family: Helvetica;
              font-size: 12px; font-style: normal; font-variant-caps:
              normal; font-weight: normal; letter-spacing: normal;
              orphans: auto; text-align: start; text-indent: 0px;
              text-transform: none; white-space: normal; widows: auto;
              word-spacing: 0px; -webkit-text-stroke-width: 0px;
              background-color: rgb(255, 255, 255);">Il 15/10/2017
              14:50, Jérôme Laheurte ha scritto:<br class="">
            </div>
            <blockquote type="cite"
              cite="mid:A4CC512B-42B2-4B9E-B2DA-BD0916B3956D@jeromelaheurte.net"
              style="font-family: Helvetica; font-size: 12px;
              font-style: normal; font-variant-caps: normal;
              font-weight: normal; letter-spacing: normal; orphans:
              auto; text-align: start; text-indent: 0px; text-transform:
              none; white-space: normal; widows: auto; word-spacing:
              0px; -webkit-text-stroke-width: 0px; background-color:
              rgb(255, 255, 255);" class="">
              <blockquote type="cite" class="">
                <pre class="" wrap="">Le 15 oct. 2017 à 14:45, Jérôme Laheurte <a class="moz-txt-link-rfc2396E" href="mailto:jerome@jeromelaheurte.net" moz-do-not-send="true"><jerome@jeromelaheurte.net></a> a écrit :

So two week-ends later I kind of have a working dev environment and started working on <a class="moz-txt-link-freetext" href="https://bugzilla.gnome.org/show_bug.cgi?id=540131" moz-do-not-send="true">https://bugzilla.gnome.org/show_bug.cgi?id=540131</a>. Unfortunately in the process I noticed that the use case (subtitle buffer arriving while another one hasn’t expired) now result in a kind of deadlock, and I’m not familiar enough with gstreamer to fully understand what is happening here. Some observations:

1. The text_chain method is blocked waiting for the previous buffer to get popped (at gstbasetextoverlay.c:2713)
2. But the video_chain method doesn’t get called any more. Since it’s the one popping old text buffers, everything stops.
3. There is nothing of interest in the debug output

This didn’t happen last time I tested a video with multiple concurrent subtitles, but that was a long time ago. It kind of looks like the text_chain and video_chain functions are now called by the same thread. Does anybody have any light to share on this ?
</pre>
              </blockquote>
              <pre class="" wrap="">More information, sorry:

* Video file: <a class="moz-txt-link-freetext" href="https://jeromelaheurte.net/owncloud/s/21E1m14sFOxfAmy" moz-do-not-send="true">https://jeromelaheurte.net/owncloud/s/21E1m14sFOxfAmy</a>
* Pipeline: gst-launch-1.0 -v filesrc location=sub.mkv ! matroskademux name=demux ! queue ! vtdec ! subtitleoverlay name=overlay ! autovideosink demux. ! ssaparse ! overlay.</pre>
            </blockquote>
            <br style="font-family: Helvetica; font-size: 12px;
              font-style: normal; font-variant-caps: normal;
              font-weight: normal; letter-spacing: normal; orphans:
              auto; text-align: start; text-indent: 0px; text-transform:
              none; white-space: normal; widows: auto; word-spacing:
              0px; -webkit-text-stroke-width: 0px; background-color:
              rgb(255, 255, 255);" class="">
            <span style="font-family: Helvetica; font-size: 12px;
              font-style: normal; font-variant-caps: normal;
              font-weight: normal; letter-spacing: normal; orphans:
              auto; text-align: start; text-indent: 0px; text-transform:
              none; white-space: normal; widows: auto; word-spacing:
              0px; -webkit-text-stroke-width: 0px; background-color:
              rgb(255, 255, 255); float: none; display: inline
              !important;" class="">try to add a queue before ssaparse,</span><br
              style="font-family: Helvetica; font-size: 12px;
              font-style: normal; font-variant-caps: normal;
              font-weight: normal; letter-spacing: normal; orphans:
              auto; text-align: start; text-indent: 0px; text-transform:
              none; white-space: normal; widows: auto; word-spacing:
              0px; -webkit-text-stroke-width: 0px; background-color:
              rgb(255, 255, 255);" class="">
          </div>
        </blockquote>
      </div>
      <br class="">
      <div class="">Nope, still deadlocking. Same place. If I’m not
        mistaken the queue ensures that the text_chain function is
        called in the queue’s thread, am I wrong ? So the problem is not
        as simple as I supposed.</div>
    </blockquote>
    <br>
    adding the queue and replacing vtdec with avdec_h264 works for me on
    linux, so the problem seems related to vtdec, I don't have a mac
    available to test with vtdec now,<br>
    <br>
    Nicola<br>
    <blockquote type="cite"
      cite="mid:674DF071-4FD1-48FD-9375-345F497F7B65@jeromelaheurte.net">
      <div class=""><br class="">
      </div>
      <div class="">Jérôme Laheurte</div>
      <div class=""><br class="">
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
gstreamer-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a>
<a class="moz-txt-link-freetext" href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>