Extracting an audio track from a working mkv file results in `terminate called after throwing an instance of 'mtx::mm_io::end_of_file_x'`
$ mkvextract a.mkv tracks 3:a/audio_en51
terminate called after throwing an instance of 'mtx::mm_io::end_of_file_x'
what(): end of file error
The file plays just fine in VLC and Kodi. mkvinfo
says (truncated later tracks, there are no errors reported by mkvinfo):
+ EBML head
|+ EBML version: 1
|+ EBML read version: 1
|+ Maximum EBML ID length: 4
|+ Maximum EBML size length: 8
|+ Document type: matroska
|+ Document type version: 4
|+ Document type read version: 2
+ Segment: size 595666822
|+ Seek head (subentries will be skipped)
|+ EBML void: size 4012
|+ Segment information
| + Timestamp scale: 1000000
| + Multiplexing application: libebml v1.3.6 + libmatroska v1.4.9
| + Writing application: mkvmerge v30.1.0 ('Forever And More') 64-bit
| + Duration: 00:24:39.530000000
| + Date: 2019-01-26 19:19:30 UTC
| + Title: Cowboy Bebop — Épisode 20
| + Segment UID: 0x29 0xfb 0xce 0x61 0x2e 0x2c 0x78 0xcf 0xef 0xb2 0x20 0xe2 0x0c 0x88 0x37 0xe6
|+ Tracks
| + Track
| + Track number: 1 (track ID for mkvmerge & mkvextract: 0)
| + Track UID: 1
| + Track type: video
| + "Lacing" flag: 0
| + Codec ID: V_MPEGH/ISO/HEVC
| + Codec's private data: size 2090 (HEVC profile: Main 10 @L4.0)
| + Default duration: 00:00:00.041708333 (23.976 frames/fields per second for a video track)
| + Language: und
| + Video track
| + Pixel width: 1448
| + Pixel height: 1080
| + Display width: 1448
| + Display height: 1080
| + Track
| + Track number: 2 (track ID for mkvmerge & mkvextract: 1)
| + Track UID: 2
| + Track type: audio
| + Codec ID: A_AAC
| + Codec's private data: size 26
| + Default duration: 00:00:00.021333333 (46.875 frames/fields per second for a video track)
| + Language: jpn
| + Name: Japanese audio 5.1
| + Audio track
| + Sampling frequency: 48000
| + Channels: 6
| + Track
| + Track number: 3 (track ID for mkvmerge & mkvextract: 2)
| + Track UID: 3
| + Track type: audio
| + "Default track" flag: 0
| + Codec ID: A_AAC
| + Codec's private data: size 26
| + Default duration: 00:00:00.021333333 (46.875 frames/fields per second for a video track)
| + Language: fre
| + Name: Son en français 5.1
| + Audio track
| + Sampling frequency: 48000
| + Channels: 6
| + Track
| + Track number: 4 (track ID for mkvmerge & mkvextract: 3)
| + Track UID: 4
| + Track type: audio
| + "Default track" flag: 0
| + Codec ID: A_AAC
| + Codec's private data: size 26
| + Default duration: 00:00:00.021333333 (46.875 frames/fields per second for a video track)
| + Name: English audio 5.1
| + Audio track
| + Sampling frequency: 48000
| + Channels: 6
| + Track
Edited by Tobias Klausmann