Fix for mp4 playback with embedded mov_text subtitles

When using an LG TV based on webos 25, subtitles embedded in mp4 are broken: a few characters are missing for each of them.

The bug is reproducible on any Linux machine by using gstreamer’s webos 25 source code (from https://opensource.lge.com).

After a few investigation, the following patch fixes it:

diff --git a/subprojects/gst-plugins-good/gst/isomp4/qtdemux.c b/subprojects/gst-plugins-good/gst/isomp4/qtdemux.c
index a6fc06e036..64b375bd39 100644
--- a/subprojects/gst-plugins-good/gst/isomp4/qtdemux.c
+++ b/subprojects/gst-plugins-good/gst/isomp4/qtdemux.c
@@ -7535,12 +7535,12 @@ gst_qtdemux_decorate_and_push_buffer (GstQTDemux * qtdemux,
         GST_CLOCK_TIME_NONE);
     gst_caps_unref (caps);
   }
-  if (G_UNLIKELY (stream->process_func))
+  /*if (G_UNLIKELY (stream->process_func))
     buf = stream->process_func (qtdemux, stream, buf);
 
   if (!buf) {
     goto exit;
-  }
+  }*/
 
   GST_BUFFER_DTS (buf) = dts;
   GST_BUFFER_PTS (buf) = pts;

Indeed, without this patch, stream->process_func is called twice, which (for some reason) causes the subtitles to “shift” by some characters. The original gstreamer 1.24 source code doesn’t do this.

It would be nice to get this fix into webos 25!

Thanks.

In webOS TV apps, only an external subtitle in the form of .vtt (WebVTT) is officially supported. For more information, please refer to Video and Audio Format specifications. Thank you.

Thanks for your answer!

To clarify the original issue: it is happening with webOS’s integrated media player, not with my own app.