Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
0391af52
Commit
0391af52
authored
Feb 21, 2005
by
Gildas Bazin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* modules/demux/ogg.c: added support for new Ogg mapping for FLAC.
parent
f3c83b01
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
3 deletions
+28
-3
modules/demux/ogg.c
modules/demux/ogg.c
+28
-3
No files found.
modules/demux/ogg.c
View file @
0391af52
...
...
@@ -520,11 +520,16 @@ static void Ogg_DecodePacket( demux_t *p_demux,
break
;
case
VLC_FOURCC
(
'f'
,
'l'
,
'a'
,
'c'
):
if
(
p_stream
->
i_packets_backup
==
2
)
if
(
!
p_stream
->
fmt
.
audio
.
i_rate
&&
p_stream
->
i_packets_backup
==
2
)
{
Ogg_ReadFlacHeader
(
p_demux
,
p_stream
,
p_oggpacket
);
p_stream
->
b_force_backup
=
0
;
}
else
if
(
p_stream
->
fmt
.
audio
.
i_rate
)
{
p_stream
->
b_force_backup
=
0
;
p_oggpacket
->
packet
+=
9
;
p_oggpacket
->
bytes
-=
9
;
}
b_store_size
=
VLC_FALSE
;
break
;
...
...
@@ -771,7 +776,7 @@ static int Ogg_FindLogicalStreams( demux_t *p_demux )
p_stream
->
fmt
.
audio
.
i_channels
,
(
int
)
p_stream
->
f_rate
,
p_stream
->
fmt
.
i_bitrate
);
}
/* Check for Flac header */
/* Check for Flac header
(< version 1.1.1)
*/
else
if
(
oggpacket
.
bytes
>=
4
&&
!
strncmp
(
&
oggpacket
.
packet
[
0
],
"fLaC"
,
4
)
)
{
...
...
@@ -785,6 +790,25 @@ static int Ogg_FindLogicalStreams( demux_t *p_demux )
p_stream
->
fmt
.
i_cat
=
AUDIO_ES
;
p_stream
->
fmt
.
i_codec
=
VLC_FOURCC
(
'f'
,
'l'
,
'a'
,
'c'
);
}
/* Check for Flac header (>= version 1.1.1) */
else
if
(
oggpacket
.
bytes
>=
13
&&
oggpacket
.
packet
[
0
]
==
0x7F
&&
!
strncmp
(
&
oggpacket
.
packet
[
1
],
"FLAC"
,
4
)
&&
!
strncmp
(
&
oggpacket
.
packet
[
9
],
"fLaC"
,
4
)
)
{
int
i_packets
=
((
int
)
oggpacket
.
packet
[
7
])
<<
8
|
oggpacket
.
packet
[
8
];
msg_Dbg
(
p_demux
,
"found FLAC header version %i.%i "
"(%i header packets)"
,
oggpacket
.
packet
[
5
],
oggpacket
.
packet
[
6
],
i_packets
);
p_stream
->
b_force_backup
=
1
;
p_stream
->
fmt
.
i_cat
=
AUDIO_ES
;
p_stream
->
fmt
.
i_codec
=
VLC_FOURCC
(
'f'
,
'l'
,
'a'
,
'c'
);
oggpacket
.
packet
+=
13
;
oggpacket
.
bytes
-=
13
;
Ogg_ReadFlacHeader
(
p_demux
,
p_stream
,
&
oggpacket
);
}
/* Check for Theora header */
else
if
(
oggpacket
.
bytes
>=
7
&&
!
strncmp
(
&
oggpacket
.
packet
[
1
],
"theora"
,
6
)
)
...
...
@@ -1253,6 +1277,7 @@ static void Ogg_ReadFlacHeader( demux_t *p_demux, logical_stream_t *p_stream,
bs_t
s
;
bs_init
(
&
s
,
p_oggpacket
->
packet
,
p_oggpacket
->
bytes
);
bs_read
(
&
s
,
1
);
if
(
bs_read
(
&
s
,
7
)
==
0
)
{
...
...
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