matroskademux: improve index memory usage

Re-arrange order of index entry struct members to avoid padding
bytes in the middle of the struct, thus potentially reducing the
overall size of the struct and reducing memory used by the index.
On Linux x86_64 the size goes down from 32 bytes to 24 bytes for
each index entry.
This commit is contained in:
Tim-Philipp Müller 2017-05-06 22:30:20 +01:00
parent 3f07947ca9
commit d826c5ad96

View file

@ -616,9 +616,9 @@ typedef struct _GstMatroskaTrackSubtitleContext {
typedef struct _GstMatroskaIndex { typedef struct _GstMatroskaIndex {
guint64 pos; /* of the corresponding *cluster*! */ guint64 pos; /* of the corresponding *cluster*! */
guint16 track; /* reference to 'num' */
GstClockTime time; /* in nanoseconds */ GstClockTime time; /* in nanoseconds */
guint32 block; /* number of the block in the cluster */ guint32 block; /* number of the block in the cluster */
guint16 track; /* reference to 'num' */
} GstMatroskaIndex; } GstMatroskaIndex;
typedef struct _Wavpack4Header { typedef struct _Wavpack4Header {