Since the segment duration is given in terms of the GST_MATROSKA_ID_TIMECODESCALE we should only convert it into nanoseconds when we are sure that any scale specified in the file has been read. https://bugzilla.gnome.org/show_bug.cgi?id=650258
GCC 4.6.x spits warnings about such variable usage.
Copied from demux. Duplicates much code, also some dead code remaining.