summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEnrique Ocaña González <eocanha@igalia.com>2017-03-22 18:18:40 +0000
committerJan Schmidt <jan@centricular.com>2017-03-23 08:36:51 +1100
commit2f68f8bd891f1529474af644f4475ee516596344 (patch)
treeac49cad445a7bbdbf62cde4fc91a581712f3b751
parent0cb502a62cd7869185dddbc9935f878badd1d03a (diff)
downloadgstreamer-plugins-good-2f68f8bd891f1529474af644f4475ee516596344.tar.gz
qtdemux: distinguish TFDT with value 0 from no TFDT at all
TFDTs with time 0 are being ignored since commit 1fc3d42f. They're mistaken with the case of not having TFDT, but those two cases must be distinguished in some way. This patch passes an extra boolean flag when the TFDT is present. This is now the condition being evaluated, instead of checking for 0 time. https://bugzilla.gnome.org/show_bug.cgi?id=780410
-rw-r--r--gst/isomp4/qtdemux.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gst/isomp4/qtdemux.c b/gst/isomp4/qtdemux.c
index ba36a9e09..4cbcaedb2 100644
--- a/gst/isomp4/qtdemux.c
+++ b/gst/isomp4/qtdemux.c
@@ -2974,7 +2974,8 @@ static gboolean
qtdemux_parse_trun (GstQTDemux * qtdemux, GstByteReader * trun,
QtDemuxStream * stream, guint32 d_sample_duration, guint32 d_sample_size,
guint32 d_sample_flags, gint64 moof_offset, gint64 moof_length,
- gint64 * base_offset, gint64 * running_offset, gint64 decode_ts)
+ gint64 * base_offset, gint64 * running_offset, gint64 decode_ts,
+ gboolean has_tfdt)
{
GstClockTime gst_ts = GST_CLOCK_TIME_NONE;
guint64 timestamp;
@@ -3135,7 +3136,7 @@ qtdemux_parse_trun (GstQTDemux * qtdemux, GstByteReader * trun,
/* If this is a GST_FORMAT_BYTES stream and there's a significant
* difference (1 sec.) between decode_ts and timestamp, prefer the
* former */
- if (decode_ts != 0 && !qtdemux->upstream_format_is_time
+ if (has_tfdt && !qtdemux->upstream_format_is_time
&& ABSDIFF (decode_ts, timestamp) >
MAX (stream->duration_last_moof / 2,
GSTTIME_TO_QTSTREAMTIME (stream, GST_SECOND))) {
@@ -3827,7 +3828,7 @@ qtdemux_parse_moof (GstQTDemux * qtdemux, const guint8 * buffer, guint length,
while (trun_node) {
qtdemux_parse_trun (qtdemux, &trun_data, stream,
ds_duration, ds_size, ds_flags, moof_offset, length, &base_offset,
- &running_offset, decode_time);
+ &running_offset, decode_time, (tfdt_node != NULL));
/* iterate all siblings */
trun_node = qtdemux_tree_get_sibling_by_type_full (trun_node, FOURCC_trun,
&trun_data);