Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
b985328e
Commit
b985328e
authored
Nov 13, 2007
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Real Demuxer: Support for Atrac-3 codecs in Real files. Close #1359.
Some new comments are in.
parent
c0f040ea
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
10 deletions
+16
-10
modules/demux/real.c
modules/demux/real.c
+16
-10
No files found.
modules/demux/real.c
View file @
b985328e
...
...
@@ -506,6 +506,7 @@ static int Demux( demux_t *p_demux )
}
else
if
(
tk
->
fmt
.
i_codec
==
VLC_FOURCC
(
'c'
,
'o'
,
'o'
,
'k'
)
||
tk
->
fmt
.
i_codec
==
VLC_FOURCC
(
'a'
,
't'
,
'r'
,
'c'
)
||
tk
->
fmt
.
i_codec
==
VLC_FOURCC
(
's'
,
'i'
,
'p'
,
'r'
)
||
tk
->
fmt
.
i_codec
==
VLC_FOURCC
(
'2'
,
'8'
,
'_'
,
'8'
)
)
{
uint8_t
*
p_buf
=
p_sys
->
buffer
;
...
...
@@ -516,7 +517,8 @@ static int Demux( demux_t *p_demux )
if
(
i_flags
&
2
)
y
=
tk
->
i_subpacket
=
0
;
if
(
tk
->
fmt
.
i_codec
==
VLC_FOURCC
(
'c'
,
'o'
,
'o'
,
'k'
)
||
tk
->
fmt
.
i_codec
==
VLC_FOURCC
(
'a'
,
't'
,
'r'
,
'c'
)
)
tk
->
fmt
.
i_codec
==
VLC_FOURCC
(
'a'
,
't'
,
'r'
,
'c'
)
||
tk
->
fmt
.
i_codec
==
VLC_FOURCC
(
's'
,
'i'
,
'p'
,
'r'
)
)
for
(
i
=
0
;
i
<
tk
->
i_frame_size
/
tk
->
i_subpacket_size
;
i
++
)
{
block_t
*
p_block
=
block_New
(
p_demux
,
tk
->
i_subpacket_size
);
...
...
@@ -1000,25 +1002,25 @@ static int ReadCodecSpecificData( demux_t *p_demux, int i_len, int i_num )
p_peek
+=
2
;
/* 00 00 */
p_peek
+=
4
;
/* .ra4 or .ra5 */
p_peek
+=
4
;
/*
??
*/
p_peek
+=
4
;
/*
data size
*/
p_peek
+=
2
;
/* version (4 or 5) */
i_header_size
=
GetDWBE
(
p_peek
);
p_peek
+=
4
;
/* header size */
i_flavor
=
GetWBE
(
p_peek
);
p_peek
+=
2
;
/* codec flavor */
i_coded_frame_size
=
GetDWBE
(
p_peek
);
p_peek
+=
4
;
i_coded_frame_size
=
GetDWBE
(
p_peek
);
p_peek
+=
4
;
/* coded frame size*/
p_peek
+=
4
;
/* ?? */
p_peek
+=
4
;
/* ?? */
p_peek
+=
4
;
/* ?? */
i_subpacket_h
=
GetWBE
(
p_peek
);
p_peek
+=
2
;
i_frame_size
=
GetWBE
(
p_peek
);
p_peek
+=
2
;
i_subpacket_size
=
GetWBE
(
p_peek
);
p_peek
+=
2
;
i_subpacket_h
=
GetWBE
(
p_peek
);
p_peek
+=
2
;
/* 1 */
i_frame_size
=
GetWBE
(
p_peek
);
p_peek
+=
2
;
/* frame size */
i_subpacket_size
=
GetWBE
(
p_peek
);
p_peek
+=
2
;
/* subpacket_size */
p_peek
+=
2
;
/* ?? */
if
(
i_version
==
5
)
p_peek
+=
6
;
/* 0, srate, 0 */
fmt
.
audio
.
i_rate
=
GetWBE
(
p_peek
);
p_peek
+=
2
;
fmt
.
audio
.
i_rate
=
GetWBE
(
p_peek
);
p_peek
+=
2
;
/* Sample Rate */
p_peek
+=
2
;
/* ?? */
fmt
.
audio
.
i_bitspersample
=
GetWBE
(
p_peek
);
p_peek
+=
2
;
fmt
.
audio
.
i_channels
=
GetWBE
(
p_peek
);
p_peek
+=
2
;
fmt
.
audio
.
i_bitspersample
=
GetWBE
(
p_peek
);
p_peek
+=
2
;
/* Sure?*/
fmt
.
audio
.
i_channels
=
GetWBE
(
p_peek
);
p_peek
+=
2
;
/* Channels */
fmt
.
audio
.
i_blockalign
=
i_frame_size
;
if
(
i_version
==
5
)
...
...
@@ -1048,6 +1050,7 @@ static int ReadCodecSpecificData( demux_t *p_demux, int i_len, int i_num )
case
VLC_FOURCC
(
'r'
,
'a'
,
'a'
,
'c'
):
case
VLC_FOURCC
(
'r'
,
'a'
,
'c'
,
'p'
):
fmt
.
i_extra
=
GetDWBE
(
p_peek
);
p_peek
+=
4
;
//version 5 ?
if
(
fmt
.
i_extra
>
0
)
{
fmt
.
i_extra
--
;
p_peek
++
;
}
if
(
fmt
.
i_extra
>
0
)
{
...
...
@@ -1060,6 +1063,7 @@ static int ReadCodecSpecificData( demux_t *p_demux, int i_len, int i_num )
case
VLC_FOURCC
(
'c'
,
'o'
,
'o'
,
'k'
):
case
VLC_FOURCC
(
'a'
,
't'
,
'r'
,
'c'
):
// case VLC_FOURCC('s','i','p','r'):
fmt
.
audio
.
i_blockalign
=
i_subpacket_size
;
if
(
!
(
fmt
.
i_extra
=
GetDWBE
(
p_peek
))
)
break
;
fmt
.
p_extra
=
malloc
(
fmt
.
i_extra
);
...
...
@@ -1067,6 +1071,7 @@ static int ReadCodecSpecificData( demux_t *p_demux, int i_len, int i_num )
break
;
case
VLC_FOURCC
(
'2'
,
'8'
,
'_'
,
'8'
):
fmt
.
i_extra
=
0
;
fmt
.
audio
.
i_blockalign
=
i_coded_frame_size
;
break
;
...
...
@@ -1097,7 +1102,8 @@ static int ReadCodecSpecificData( demux_t *p_demux, int i_len, int i_num )
tk
->
i_subpacket
=
0
;
tk
->
i_subpackets
=
0
;
tk
->
p_subpackets
=
NULL
;
if
(
fmt
.
i_codec
==
VLC_FOURCC
(
'c'
,
'o'
,
'o'
,
'k'
)
)
if
(
fmt
.
i_codec
==
VLC_FOURCC
(
'c'
,
'o'
,
'o'
,
'k'
)
||
fmt
.
i_codec
==
VLC_FOURCC
(
'a'
,
't'
,
'r'
,
'c'
)
)
{
tk
->
i_subpackets
=
i_subpacket_h
*
i_frame_size
/
tk
->
i_subpacket_size
;
...
...
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