<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[200454] trunk/Tools</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/200454">200454</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2016-05-05 01:40:21 -0700 (Thu, 05 May 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre>[GStreamer] Bump internal jhbuild versions to 1.8.0 and patches to support MSE
https://bugs.webkit.org/show_bug.cgi?id=157341
Patch by Enrique Ocaña González <eocanha@igalia.com> on 2016-05-05
Reviewed by Xabier Rodriguez-Calvar.
* gtk/jhbuild.modules:
* gtk/patches/gst-plugins-good-Revert-qtdemux-expose-streams-with-first-moof-for-fr.patch: Added.
* gtk/patches/gst-plugins-good-use-the-tfdt-decode-time.patch: Added.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsgtkjhbuildmodules">trunk/Tools/gtk/jhbuild.modules</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkToolsgtkpatchesgstpluginsgoodRevertqtdemuxexposestreamswithfirstmoofforfrpatch">trunk/Tools/gtk/patches/gst-plugins-good-Revert-qtdemux-expose-streams-with-first-moof-for-fr.patch</a></li>
<li><a href="#trunkToolsgtkpatchesgstpluginsgoodusethetfdtdecodetimepatch">trunk/Tools/gtk/patches/gst-plugins-good-use-the-tfdt-decode-time.patch</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (200453 => 200454)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog        2016-05-05 08:25:23 UTC (rev 200453)
+++ trunk/Tools/ChangeLog        2016-05-05 08:40:21 UTC (rev 200454)
</span><span class="lines">@@ -1,3 +1,14 @@
</span><ins>+2016-05-05 Enrique Ocaña González <eocanha@igalia.com>
+
+ [GStreamer] Bump internal jhbuild versions to 1.8.0 and patches to support MSE
+ https://bugs.webkit.org/show_bug.cgi?id=157341
+
+ Reviewed by Xabier Rodriguez-Calvar.
+
+ * gtk/jhbuild.modules:
+ * gtk/patches/gst-plugins-good-Revert-qtdemux-expose-streams-with-first-moof-for-fr.patch: Added.
+ * gtk/patches/gst-plugins-good-use-the-tfdt-decode-time.patch: Added.
+
</ins><span class="cx"> 2016-05-04 Srinivasan Vijayaraghavan <svijayaraghavan@apple.com>
</span><span class="cx">
</span><span class="cx"> Add JSC test results in JSON format to a Buildbot log
</span></span></pre></div>
<a id="trunkToolsgtkjhbuildmodules"></a>
<div class="modfile"><h4>Modified: trunk/Tools/gtk/jhbuild.modules (200453 => 200454)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/gtk/jhbuild.modules        2016-05-05 08:25:23 UTC (rev 200453)
+++ trunk/Tools/gtk/jhbuild.modules        2016-05-05 08:40:21 UTC (rev 200454)
</span><span class="lines">@@ -333,10 +333,10 @@
</span><span class="cx"> <dependencies>
</span><span class="cx"> <dep package="orc"/>
</span><span class="cx"> </dependencies>
</span><del>- <branch module="gstreamer/gstreamer-${version}.tar.xz" version="1.6.3"
</del><ins>+ <branch module="gstreamer/gstreamer-${version}.tar.xz" version="1.8.0"
</ins><span class="cx"> repo="gstreamer"
</span><del>- hash="sha256:22f9568d67b87cf700a111f381144bd37cb93790a77e4e331db01fe854a37f24"
- md5sum="b4cdeb2b9cb20dd6ac022a4f417eae0d"/>
</del><ins>+ hash="sha256:947a314a212b5d94985d89b43440dbe66b696e12bbdf9a2f78967b98d74abedc"
+ md5sum="6846d7289ec323c38c49b818171e955a"/>
</ins><span class="cx"> </autotools>
</span><span class="cx">
</span><span class="cx"> <autotools id="gst-plugins-base"
</span><span class="lines">@@ -348,10 +348,10 @@
</span><span class="cx"> <dependencies>
</span><span class="cx"> <dep package="gstreamer"/>
</span><span class="cx"> </dependencies>
</span><del>- <branch module="gst-plugins-base/gst-plugins-base-${version}.tar.xz" version="1.6.3"
</del><ins>+ <branch module="gst-plugins-base/gst-plugins-base-${version}.tar.xz" version="1.8.0"
</ins><span class="cx"> repo="gstreamer"
</span><del>- hash="sha256:b6154f8fdba4877e95efd94610ef0ada4f0171cd12eb829a3c3c97345d9c7a75"
- md5sum="3ddde0ad598ef69f58d6a2e87f8b460f"/>
</del><ins>+ hash="sha256:abc0acc1d15b4b9c97c65cd9689bd6400081853b9980ea428d3c8572dd791522"
+ md5sum="20cc8231609318310f2a55f64c86cbb4"/>
</ins><span class="cx"> </autotools>
</span><span class="cx">
</span><span class="cx"> <autotools id="gst-plugins-good" autogenargs="--disable-examples --disable-soup --disable-gtk-doc">
</span><span class="lines">@@ -362,10 +362,13 @@
</span><span class="cx"> <dep package="gst-plugins-base"/>
</span><span class="cx"> </dependencies>
</span><span class="cx">
</span><del>- <branch module="gst-plugins-good/gst-plugins-good-${version}.tar.xz" version="1.6.3"
</del><ins>+ <branch module="gst-plugins-good/gst-plugins-good-${version}.tar.xz" version="1.8.0"
</ins><span class="cx"> repo="gstreamer"
</span><del>- hash="sha256:24b19db70b2a83461ebddfe20033db432dadfdb5d4b54ffb1dfa0d830134a177"
- md5sum="a1958df7aa498b42793e2f2048673815"/>
</del><ins>+ hash="sha256:c20c134d47dbc238d921707a3b66da709c2b4dd89f9d267cec13d1ddf16e9f4d"
+ md5sum="91ed4649c7c2e43a61f731d144f6f6d0">
+ <patch file="gst-plugins-good-use-the-tfdt-decode-time.patch" strip="1"/>
+ <patch file="gst-plugins-good-Revert-qtdemux-expose-streams-with-first-moof-for-fr.patch" strip="1"/>
+ </branch>
</ins><span class="cx"> </autotools>
</span><span class="cx">
</span><span class="cx"> <autotools id="gst-plugins-bad" autogenargs="--disable-examples --disable-gtk-doc">
</span><span class="lines">@@ -375,20 +378,20 @@
</span><span class="cx"> <dependencies>
</span><span class="cx"> <dep package="gst-plugins-base"/>
</span><span class="cx"> </dependencies>
</span><del>- <branch module="gst-plugins-bad/gst-plugins-bad-${version}.tar.xz" version="1.6.3"
</del><ins>+ <branch module="gst-plugins-bad/gst-plugins-bad-${version}.tar.xz" version="1.8.0"
</ins><span class="cx"> repo="gstreamer"
</span><del>- hash="sha256:971b29101d6a9c5e3fe94d99d977a227f58f0b2d29b6ca2c7f292052542b3a61"
- md5sum="4857adcafe41e4b9b8805cf88303bd55"/>
</del><ins>+ hash="sha256:116376dd1085082422e0b21b0ecd3d1cb345c469c58e32463167d4675f4ca90e"
+ md5sum="1c2d797bb96a81e9ef570c7a0a37203e"/>
</ins><span class="cx"> </autotools>
</span><span class="cx">
</span><span class="cx"> <autotools id="gst-libav" autogenargs="--with-libav-extra-configure='--disable-yasm' --disable-gtk-doc">
</span><span class="cx"> <dependencies>
</span><span class="cx"> <dep package="gst-plugins-base"/>
</span><span class="cx"> </dependencies>
</span><del>- <branch module="gst-libav/gst-libav-${version}.tar.xz" version="1.6.3"
</del><ins>+ <branch module="gst-libav/gst-libav-${version}.tar.xz" version="1.8.0"
</ins><span class="cx"> repo="gstreamer"
</span><del>- hash="sha256:857b9c060a0337de38c6d26238c47352433c02eabf26c2f860c854dbc35bd4ab"
- md5sum="cfe9a06913d4fd4067e9e47f6e05fac2"/>
</del><ins>+ hash="sha256:5a1ce28876aee93cb4f3d090f0e807915a5d9bc1325e3480dd302b85aeb4291c"
+ md5sum="361638fa45466c5050bcde6bfe10fa46"/>
</ins><span class="cx"> </autotools>
</span><span class="cx">
</span><span class="cx"> <autotools id="xserver" autogenargs="--disable-xinerama --enable-glx --enable-composite --disable-xorg --disable-dmx --disable-xnest --disable-xquartz --disable-xwin --disable-xephyr --disable-xfake --disable-xfbdev --disable-install-setuid --disable-unit-tests --disable-present --enable-unix-transport --enable-tcp-transport --disable-local-transport --with-xkb-path=/usr/share/X11/xkb --with-xkb-output=/var/lib/xkb --with-xkb-bin-directory=/usr/bin --without-dtrace">
</span></span></pre></div>
<a id="trunkToolsgtkpatchesgstpluginsgoodRevertqtdemuxexposestreamswithfirstmoofforfrpatch"></a>
<div class="addfile"><h4>Added: trunk/Tools/gtk/patches/gst-plugins-good-Revert-qtdemux-expose-streams-with-first-moof-for-fr.patch (0 => 200454)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/gtk/patches/gst-plugins-good-Revert-qtdemux-expose-streams-with-first-moof-for-fr.patch         (rev 0)
+++ trunk/Tools/gtk/patches/gst-plugins-good-Revert-qtdemux-expose-streams-with-first-moof-for-fr.patch        2016-05-05 08:40:21 UTC (rev 200454)
</span><span class="lines">@@ -0,0 +1,133 @@
</span><ins>+From 1a81bd90d4a3e59d6669a0bbfa456f1ed4e5db48 Mon Sep 17 00:00:00 2001
+From: Xabier Rodriguez Calvar <calvaris@igalia.com>
+Date: Thu, 7 Apr 2016 13:57:16 +0200
+Subject: [PATCH] Revert "qtdemux: expose streams with first moof for
+ fragmented format"
+
+This reverts commit d8bb6687ea251570c331038279a43d448167d6ad.
+---
+ gst/isomp4/qtdemux.c | 54 ++++++++++++++++------------------------------------
+ gst/isomp4/qtdemux.h | 1 -
+ 2 files changed, 16 insertions(+), 39 deletions(-)
+
+diff --git a/gst/isomp4/qtdemux.c b/gst/isomp4/qtdemux.c
+index 39be163..9636b4b 100644
+--- a/gst/isomp4/qtdemux.c
++++ b/gst/isomp4/qtdemux.c
+@@ -609,7 +609,6 @@ gst_qtdemux_init (GstQTDemux * qtdemux)
+ qtdemux->state = QTDEMUX_STATE_INITIAL;
+ qtdemux->pullbased = FALSE;
+ qtdemux->posted_redirect = FALSE;
+- qtdemux->pending_configure = FALSE;
+ qtdemux->neededbytes = 16;
+ qtdemux->todrop = 0;
+ qtdemux->adapter = gst_adapter_new ();
+@@ -2049,7 +2048,6 @@ gst_qtdemux_reset (GstQTDemux * qtdemux, gboolean hard)
+ gst_caps_replace (&qtdemux->media_caps, NULL);
+ qtdemux->timescale = 0;
+ qtdemux->got_moov = FALSE;
+- qtdemux->pending_configure = FALSE;
+ } else if (qtdemux->mss_mode) {
+ gst_flow_combiner_reset (qtdemux->flowcombiner);
+ for (n = 0; n < qtdemux->n_streams; n++)
+@@ -6104,7 +6102,6 @@ gst_qtdemux_process_adapter (GstQTDemux * demux, gboolean force)
+ &fourcc);
+ if (fourcc == FOURCC_moov) {
+ gint n;
+- gboolean got_samples = FALSE;
+
+ /* in usual fragmented setup we could try to scan for more
+ * and end up at the the moov (after mdat) again */
+@@ -6136,27 +6133,19 @@ gst_qtdemux_process_adapter (GstQTDemux * demux, gboolean force)
+ qtdemux_node_dump (demux, demux->moov_node);
+ qtdemux_parse_tree (demux);
+ qtdemux_prepare_streams (demux);
++ if (!demux->got_moov)
++ qtdemux_expose_streams (demux);
++ else {
+
+- for (n = 0; n < demux->n_streams; n++) {
+- QtDemuxStream *stream = demux->streams[n];
+- got_samples |= stream->stbl_index >= 0;
+- }
+- if (!demux->fragmented || got_samples) {
+- if (!demux->got_moov) {
+- qtdemux_expose_streams (demux);
+- } else {
+- for (n = 0; n < demux->n_streams; n++) {
+- QtDemuxStream *stream = demux->streams[n];
+- gst_qtdemux_configure_stream (demux, stream);
+- }
++ for (n = 0; n < demux->n_streams; n++) {
++ QtDemuxStream *stream = demux->streams[n];
++
++ gst_qtdemux_configure_stream (demux, stream);
+ }
+- gst_qtdemux_check_send_pending_segment (demux);
+- demux->pending_configure = FALSE;
+- } else {
+- demux->pending_configure = TRUE;
+ }
+
+ demux->got_moov = TRUE;
++ gst_qtdemux_check_send_pending_segment (demux);
+
+ /* fragmented streams headers shouldn't contain edts atoms */
+ if (!demux->fragmented) {
+@@ -6175,7 +6164,6 @@ gst_qtdemux_process_adapter (GstQTDemux * demux, gboolean force)
+ guint64 dist = 0;
+ GstClockTime prev_pts;
+ guint64 prev_offset;
+- gint n;
+
+ GST_DEBUG_OBJECT (demux, "Parsing [moof]");
+
+@@ -6209,25 +6197,15 @@ gst_qtdemux_process_adapter (GstQTDemux * demux, gboolean force)
+ ret = GST_FLOW_ERROR;
+ goto done;
+ }
+- /* in MSS we need to expose the pads after the first moof as we won't get a moov
+- * Also, fragmented format need to be exposed if a moov have no valid sample data */
+- if (demux->mss_mode || demux->pending_configure) {
+- if (!demux->exposed) {
+- if (!demux->pending_newsegment) {
+- GstSegment segment;
+- gst_segment_init (&segment, GST_FORMAT_TIME);
+- GST_DEBUG_OBJECT (demux, "new pending_newsegment");
+- demux->pending_newsegment = gst_event_new_segment (&segment);
+- }
+- qtdemux_expose_streams (demux);
+- } else {
+- for (n = 0; n < demux->n_streams; n++) {
+- QtDemuxStream *stream = demux->streams[n];
+- gst_qtdemux_configure_stream (demux, stream);
+- }
++ /* in MSS we need to expose the pads after the first moof as we won't get a moov */
++ if (demux->mss_mode && !demux->exposed) {
++ if (!demux->pending_newsegment) {
++ GstSegment segment;
++ gst_segment_init (&segment, GST_FORMAT_TIME);
++ GST_DEBUG_OBJECT (demux, "new pending_newsegment");
++ demux->pending_newsegment = gst_event_new_segment (&segment);
+ }
+- gst_qtdemux_check_send_pending_segment (demux);
+- demux->pending_configure = FALSE;
++ qtdemux_expose_streams (demux);
+ }
+ } else {
+ GST_DEBUG_OBJECT (demux, "Discarding [moof]");
+diff --git a/gst/isomp4/qtdemux.h b/gst/isomp4/qtdemux.h
+index 6061215..ecf0c63 100644
+--- a/gst/isomp4/qtdemux.h
++++ b/gst/isomp4/qtdemux.h
+@@ -89,7 +89,6 @@ struct _GstQTDemux {
+ gboolean posted_redirect;
+
+ /* push based variables */
+- gboolean pending_configure;
+ guint neededbytes;
+ guint todrop;
+ GstAdapter *adapter;
+--
+2.8.0.rc3
+
</ins></span></pre></div>
<a id="trunkToolsgtkpatchesgstpluginsgoodusethetfdtdecodetimepatch"></a>
<div class="addfile"><h4>Added: trunk/Tools/gtk/patches/gst-plugins-good-use-the-tfdt-decode-time.patch (0 => 200454)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/gtk/patches/gst-plugins-good-use-the-tfdt-decode-time.patch         (rev 0)
+++ trunk/Tools/gtk/patches/gst-plugins-good-use-the-tfdt-decode-time.patch        2016-05-05 08:40:21 UTC (rev 200454)
</span><span class="lines">@@ -0,0 +1,146 @@
</span><ins>+From 46d3e0faa922643094a5e46a32e4f82f774ae772 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Enrique=20Oca=C3=B1a=20Gonz=C3=A1lez?= <eocanha@igalia.com>
+Date: Tue, 10 Nov 2015 13:09:00 +0100
+Subject: [PATCH] Use the tfdt decode time when it's significantly different
+ than the time in the last sample if always-honor-tfdt is enabled
+
+https://bugzilla.gnome.org/show_bug.cgi?id=754230
+---
+ gst/isomp4/qtdemux.c | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++++
+ gst/isomp4/qtdemux.h | 1 +
+ 2 files changed, 73 insertions(+)
+
+diff --git a/gst/isomp4/qtdemux.c b/gst/isomp4/qtdemux.c
+index 880595e..d8b54f0 100644
+--- a/gst/isomp4/qtdemux.c
++++ b/gst/isomp4/qtdemux.c
+@@ -535,6 +535,11 @@ static void gst_qtdemux_append_protection_system_id (GstQTDemux * qtdemux,
+ const gchar * id);
+ static void qtdemux_gst_structure_free (GstStructure * gststructure);
+
++static void gst_qtdemux_set_property (GObject * object, guint prop_id,
++ const GValue * value, GParamSpec * spec);
++static void gst_qtdemux_get_property (GObject * object, guint prop_id,
++ GValue * value, GParamSpec * spec);
++
+ static void
+ gst_qtdemux_class_init (GstQTDemuxClass * klass)
+ {
+@@ -546,8 +551,21 @@ gst_qtdemux_class_init (GstQTDemuxClass * klass)
+
+ parent_class = g_type_class_peek_parent (klass);
+
++ gobject_class->set_property = gst_qtdemux_set_property;
++ gobject_class->get_property = gst_qtdemux_get_property;
++
+ gobject_class->dispose = gst_qtdemux_dispose;
+
++ /**
++ * GstQtDemux::always-honor-tfdt:
++ *
++ * Requests the demuxer to respect what the TFDT atom says in order to produce presentation timestamps. Defaults to FALSE.
++ */
++ g_object_class_install_property (gobject_class, PROP_ALWAYS_HONOR_TFDT,
++ g_param_spec_boolean ("always-honor-tfdt", "Always honor TFDT",
++ "When enabled, TFDT atom will always be respected in order to produce presentation timestamps",
++ FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
++
+ gstelement_class->change_state = GST_DEBUG_FUNCPTR (gst_qtdemux_change_state);
+ #if 0
+ gstelement_class->set_index = GST_DEBUG_FUNCPTR (gst_qtdemux_set_index);
+@@ -611,6 +629,7 @@ gst_qtdemux_init (GstQTDemux * qtdemux)
+ qtdemux->cenc_aux_info_sizes = NULL;
+ qtdemux->cenc_aux_sample_count = 0;
+ qtdemux->protection_system_ids = NULL;
++ qtdemux->always_honor_tfdt = FALSE;
+ g_queue_init (&qtdemux->protection_event_queue);
+ gst_segment_init (&qtdemux->segment, GST_FORMAT_TIME);
+ qtdemux->flowcombiner = gst_flow_combiner_new ();
+@@ -639,6 +658,42 @@ gst_qtdemux_dispose (GObject * object)
+ }
+
+ static void
++gst_qtdemux_set_property (GObject * object, guint prop_id,
++ const GValue * value, GParamSpec * pspec)
++{
++ GstQTDemux *qtdemux = GST_QTDEMUX (object);
++
++ switch (prop_id) {
++ case PROP_ALWAYS_HONOR_TFDT:
++ GST_OBJECT_LOCK (qtdemux);
++ qtdemux->always_honor_tfdt = g_value_get_boolean (value);
++ GST_OBJECT_UNLOCK (qtdemux);
++ break;
++ default:
++ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
++ break;
++ }
++}
++
++static void
++gst_qtdemux_get_property (GObject * object, guint prop_id, GValue * value,
++ GParamSpec * pspec)
++{
++ GstQTDemux *qtdemux = GST_QTDEMUX (object);
++
++ switch (prop_id) {
++ case PROP_ALWAYS_HONOR_TFDT:
++ GST_OBJECT_LOCK (qtdemux);
++ g_value_set_boolean (value, qtdemux->always_honor_tfdt);
++ GST_OBJECT_UNLOCK (qtdemux);
++ break;
++ default:
++ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
++ break;
++ }
++}
++
++static void
+ gst_qtdemux_post_no_playable_stream_error (GstQTDemux * qtdemux)
+ {
+ if (qtdemux->posted_redirect) {
+@@ -2995,6 +3050,16 @@ qtdemux_parse_trun (GstQTDemux * qtdemux, GstByteReader * trun,
+ stream->samples[stream->n_samples - 1].timestamp +
+ stream->samples[stream->n_samples - 1].duration;
+
++ /* If we're always honoring TFDT and there's a significative difference
++ * between the decode_ts and the timestamp, prefer decode_ts */
++ if (qtdemux->always_honor_tfdt == TRUE
++ && abs (decode_ts - timestamp) >
++ stream->samples[stream->n_samples - 1].duration) {
++ GST_INFO_OBJECT (qtdemux,
++ "decode_ts is significantly different from timestamp, using decode_ts");
++ timestamp = decode_ts;
++ }
++
+ gst_ts = QTSTREAMTIME_TO_GSTTIME (stream, timestamp);
+ GST_INFO_OBJECT (qtdemux, "first sample ts %" GST_TIME_FORMAT
+ " (extends previous samples)", GST_TIME_ARGS (gst_ts));
+diff --git a/gst/isomp4/qtdemux.h b/gst/isomp4/qtdemux.h
+index 53bd071..ecf0c63 100644
+--- a/gst/isomp4/qtdemux.h
++++ b/gst/isomp4/qtdemux.h
+@@ -154,12 +154,20 @@ struct _GstQTDemux {
+ guint8 *cenc_aux_info_sizes;
+ guint32 cenc_aux_sample_count;
+
++ gboolean always_honor_tfdt;
+ };
+
+ struct _GstQTDemuxClass {
+ GstElementClass parent_class;
+ };
+
++/* props */
++enum
++{
++ PROP_0,
++ PROP_ALWAYS_HONOR_TFDT
++};
++
+ GType gst_qtdemux_get_type (void);
+
+ G_END_DECLS
+--
+2.6.1
+
</ins></span></pre>
</div>
</div>
</body>
</html>