Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
9139b342
Commit
9139b342
authored
Jun 28, 2009
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Forged a TTA1 header in matroska if not present.
parent
a1fa3487
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
4 deletions
+24
-4
modules/demux/mkv/matroska_segment.cpp
modules/demux/mkv/matroska_segment.cpp
+24
-4
No files found.
modules/demux/mkv/matroska_segment.cpp
View file @
9139b342
...
...
@@ -989,10 +989,30 @@ bool matroska_segment_c::Select( mtime_t i_start_time )
}
else
if
(
!
strcmp
(
tracks
[
i_track
]
->
psz_codec
,
"A_TTA1"
)
)
{
tracks
[
i_track
]
->
fmt
.
i_codec
=
VLC_CODEC_TTA
;
tracks
[
i_track
]
->
fmt
.
i_extra
=
tracks
[
i_track
]
->
i_extra_data
;
tracks
[
i_track
]
->
fmt
.
p_extra
=
malloc
(
tracks
[
i_track
]
->
i_extra_data
);
memcpy
(
tracks
[
i_track
]
->
fmt
.
p_extra
,
tracks
[
i_track
]
->
p_extra_data
,
tracks
[
i_track
]
->
i_extra_data
);
p_fmt
->
i_codec
=
VLC_CODEC_TTA
;
p_fmt
->
i_extra
=
p_tk
->
i_extra_data
;
if
(
p_fmt
->
i_extra
>
0
)
{
p_fmt
->
p_extra
=
malloc
(
p_tk
->
i_extra_data
);
if
(
!
p_fmt
->
p_extra
)
abort
();
memcpy
(
p_fmt
->
p_extra
,
p_tk
->
p_extra_data
,
p_tk
->
i_extra_data
);
}
else
{
p_fmt
->
i_extra
=
30
;
p_fmt
->
p_extra
=
malloc
(
p_fmt
->
i_extra
);
if
(
!
p_fmt
->
p_extra
)
abort
();
uint8_t
*
p_extra
=
(
uint8_t
*
)
p_fmt
->
p_extra
;
memcpy
(
&
p_extra
[
0
],
"TTA1"
,
4
);
SetWLE
(
&
p_extra
[
4
],
1
);
SetWLE
(
&
p_extra
[
6
],
p_fmt
->
audio
.
i_channels
);
SetWLE
(
&
p_extra
[
8
],
p_fmt
->
audio
.
i_bitspersample
);
SetDWLE
(
&
p_extra
[
10
],
p_fmt
->
audio
.
i_rate
);
SetDWLE
(
&
p_extra
[
14
],
0xffffffff
);
memset
(
&
p_extra
[
18
],
0
,
30
-
18
);
}
}
else
if
(
!
strcmp
(
tracks
[
i_track
]
->
psz_codec
,
"A_PCM/INT/BIG"
)
||
!
strcmp
(
tracks
[
i_track
]
->
psz_codec
,
"A_PCM/INT/LIT"
)
||
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment