mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2024-12-24 11:54:01 +00:00
Use proper indexes for the set_as_default_track function and NOT the indexes from libmatroska for track_*.
This commit is contained in:
parent
c0c49885f7
commit
fcbe6b82b0
@ -1,5 +1,9 @@
|
||||
2004-07-19 Moritz Bunkus <moritz@bunkus.org>
|
||||
|
||||
* mkvmerge: bug fix: The Matroska reader contained a nice little
|
||||
illegal memory access (introduced in 0.9.3 with the fixes to the
|
||||
'default track' handling).
|
||||
|
||||
* mkvmerge: bug fix: The SSA reader was segfaulting if a line
|
||||
contained an empty text field.
|
||||
|
||||
|
@ -1430,7 +1430,9 @@ kax_reader_c::init_passthrough_packetizer(kax_track_t *t) {
|
||||
void
|
||||
kax_reader_c::set_packetizer_headers(kax_track_t *t) {
|
||||
if (t->default_track)
|
||||
PTZR(t->ptzr)->set_as_default_track(MAP_TRACK_TYPE(t->type),
|
||||
PTZR(t->ptzr)->set_as_default_track(t->type == 'v' ? DEFTRACK_TYPE_VIDEO :
|
||||
t->type == 'a' ? DEFTRACK_TYPE_AUDIO :
|
||||
DEFTRACK_TYPE_SUBS,
|
||||
DEFAULT_TRACK_PRIORITY_FROM_SOURCE);
|
||||
if (t->tuid != 0)
|
||||
if (!PTZR(t->ptzr)->set_uid(t->tuid))
|
||||
|
@ -543,11 +543,11 @@ generic_packetizer_c::set_headers() {
|
||||
htrack_default_duration;
|
||||
|
||||
if (htrack_type == track_audio)
|
||||
idx = 0;
|
||||
idx = DEFTRACK_TYPE_AUDIO;
|
||||
else if (htrack_type == track_video)
|
||||
idx = 1;
|
||||
idx = DEFTRACK_TYPE_VIDEO;
|
||||
else
|
||||
idx = 2;
|
||||
idx = DEFTRACK_TYPE_SUBS;
|
||||
|
||||
if (ti->default_track)
|
||||
set_as_default_track(idx, DEFAULT_TRACK_PRIORITY_CMDLINE);
|
||||
@ -686,11 +686,11 @@ generic_packetizer_c::fix_headers() {
|
||||
int idx;
|
||||
|
||||
if (htrack_type == track_audio)
|
||||
idx = 0;
|
||||
idx = DEFTRACK_TYPE_AUDIO;
|
||||
else if (htrack_type == track_video)
|
||||
idx = 1;
|
||||
idx = DEFTRACK_TYPE_VIDEO;
|
||||
else
|
||||
idx = 2;
|
||||
idx = DEFTRACK_TYPE_SUBS;
|
||||
|
||||
if (default_tracks[idx] == hserialno)
|
||||
*(static_cast<EbmlUInteger *>
|
||||
|
@ -53,6 +53,10 @@ using namespace std;
|
||||
#define CUES_ALL 2
|
||||
#define CUES_SPARSE 3
|
||||
|
||||
#define DEFTRACK_TYPE_AUDIO 0
|
||||
#define DEFTRACK_TYPE_VIDEO 1
|
||||
#define DEFTRACK_TYPE_SUBS 2
|
||||
|
||||
class memory_c {
|
||||
public:
|
||||
unsigned char *data;
|
||||
|
Loading…
Reference in New Issue
Block a user