After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 707975 - qtdemux: Can't handle datetimes before 1970 yet
qtdemux: Can't handle datetimes before 1970 yet
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
unspecified
Other Linux
: Normal normal
: 1.2.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-09-12 13:55 UTC by Mohammed Sameer
Modified: 2013-09-30 08:25 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
qtdemux: add code to parse creation time earlier than 1970 (2.38 KB, patch)
2013-09-16 14:47 UTC, Thiago Sousa Santos
committed Details | Review

Description Mohammed Sameer 2013-09-12 13:55:26 UTC
trying to play this file http://ftp.nluug.nl/ftp/graphics/blender/apricot/trailer/sintel_trailer-1080p.mp4 leads to the following warning from qtdemux

0:00:00.127056311  2783  0x191e7b0 WARN                 qtdemux qtdemux.c:8854:qtdemux_parse_tree:<qtdemux0> Can't handle datetimes before 1970 yet, please file a bug at http://bugzilla.gnome.org


I am using 0.10 branch but I am not sure it's reproducible on 1.0 or not but a bug is being filed per the warning ;)
Comment 1 Sebastian Dröge (slomo) 2013-09-13 07:26:23 UTC
Still happens with latest git master:
0:00:00.129251237  4368 0x7f93e00f7770 WARN                 qtdemux qtdemux.c:9810:qtdemux_parse_tree:<qtdemux0> Can't handle datetimes before 1970 yet, please file a bug at http://bugzilla.gnome.org
Comment 2 Thiago Sousa Santos 2013-09-16 14:47:35 UTC
Created attachment 255034 [details] [review]
qtdemux: add code to parse creation time earlier than 1970

Use g_date_time seconds manipulation to allow to cover the quicktime
spec for creation_time. It uses seconds since 1904.

Both paths could be done using the generic approach of seconds since
1904 with GDateTime handling, but the first path using seconds from
1970 should be more commonly found and avoids a few objects creation and
ref/unref, so keep it there for performance.

Additionally, the code for handling seconds since 1970 changed from >
to >= because having 0 seconds since 1970 is also a valid case for that
path to handle.

----
This particular sample has a creation_time of 1970-01-01 00:00:00, so it
could be handled directly by simply changing the > for a >= in the
creation_time sanity check. However, as we visit this code, let's fix it for
once and add 'seconds since 1904' handling.
Comment 3 Thiago Sousa Santos 2013-09-24 22:27:23 UTC
commit dc02d91c14847e48b6e830ff58f2dd27ecae336d
Author: Thiago Santos <thiago.sousa.santos@collabora.com>
Date:   Mon Sep 16 11:20:51 2013 -0300

    qtdemux: add code to parse creation time earlier than 1970
    
    Use g_date_time seconds manipulation to allow to cover the quicktime
    spec for creation_time. It uses seconds since 1904.
    
    Both paths could be done using the generic approach of seconds since
    1904 with GDateTime handling, but the first path using seconds from
    1970 should be more commonly found and avoids a few objects creation and
    ref/unref, so keep it there for performance.
    
    Additionally, the code for handling seconds since 1970 changed from >
    to >= because having 0 seconds since 1970 is also a valid case for that
    path to handle.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=707975