diff options
Diffstat (limited to 'gst/matroska/ebml-read.c')
-rw-r--r-- | gst/matroska/ebml-read.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/gst/matroska/ebml-read.c b/gst/matroska/ebml-read.c index 00d353dd..db5d4a5c 100644 --- a/gst/matroska/ebml-read.c +++ b/gst/matroska/ebml-read.c @@ -591,13 +591,18 @@ gst_ebml_read_utf8 (GstEbmlRead * ebml, guint32 * id, gchar ** str) } /* - * Read the next element as a date (nanoseconds since 1/1/2000). + * Read the next element as a date. + * Returns the seconds since the unix epoch. */ gboolean gst_ebml_read_date (GstEbmlRead * ebml, guint32 * id, gint64 * date) { - return gst_ebml_read_sint (ebml, id, date); + gint64 ebml_date; + gboolean res = gst_ebml_read_sint (ebml, id, &ebml_date); + + *date = (ebml_date / GST_SECOND) + GST_EBML_DATE_OFFSET; + return res; } /* |