]> git.sesse.net Git - ffmpeg/commit
avformat/matroskaenc: Avoid unnecessary seek
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Sun, 29 Dec 2019 11:50:46 +0000 (12:50 +0100)
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Mon, 30 Mar 2020 03:35:34 +0000 (05:35 +0200)
commitb1c3d711df0d50bc367cc7000f346ae700667a31
tree3b7aa477fdc11e65fa7a3e7286d15dfbd244a295
parent8c89fc18e6125ae0449091d82a2fe200ed848c43
avformat/matroskaenc: Avoid unnecessary seek

When writing the SeekHead (a form of index) at the end of the muxing
process, mkv_write_seekhead() would first seek to the position where the
SeekHead ought to be written, then write it there and seek back to the
original position afterwards. Which means: To the end of the file.
Afterwards, a seek to the beginning of the file is performed to update
further values. This of course means that the second seek in
mkv_write_seekhead() was unnecessary.

This has been changed: A new parameter was added to mkv_write_seekhead()
containing the destination for the second seek, effectively eliminating
the seek to the end of the file after writing the SeekHead.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
libavformat/matroskaenc.c