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
8584fc6e
Commit
8584fc6e
authored
Jan 03, 2014
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
demux: ogg: split comments parsing from xiph unpack
parent
18b224c9
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
50 additions
and
43 deletions
+50
-43
modules/demux/ogg.c
modules/demux/ogg.c
+50
-43
No files found.
modules/demux/ogg.c
View file @
8584fc6e
...
@@ -2119,20 +2119,11 @@ static bool Ogg_LogicalStreamResetEsFormat( demux_t *p_demux, logical_stream_t *
...
@@ -2119,20 +2119,11 @@ static bool Ogg_LogicalStreamResetEsFormat( demux_t *p_demux, logical_stream_t *
return
!
b_compatible
;
return
!
b_compatible
;
}
}
static
void
Ogg_ExtractXiphMeta
(
demux_t
*
p_demux
,
es_format_t
*
p_fmt
,
const
void
*
p_headers
,
unsigned
i_headers
,
unsigned
i_skip
)
static
void
Ogg_ExtractComments
(
demux_t
*
p_demux
,
es_format_t
*
p_fmt
,
const
void
*
p_headers
,
unsigned
i_headers
)
{
{
demux_sys_t
*
p_ogg
=
p_demux
->
p_sys
;
demux_sys_t
*
p_ogg
=
p_demux
->
p_sys
;
unsigned
pi_size
[
XIPH_MAX_HEADER_COUNT
];
void
*
pp_data
[
XIPH_MAX_HEADER_COUNT
];
unsigned
i_count
;
if
(
xiph_SplitHeaders
(
pi_size
,
pp_data
,
&
i_count
,
i_headers
,
p_headers
)
)
return
;
/* TODO how to handle multiple comments properly ? */
if
(
i_count
>=
2
&&
pi_size
[
1
]
>
i_skip
)
{
int
i_cover_score
=
0
;
int
i_cover_score
=
0
;
int
i_cover_idx
=
0
;
int
i_cover_idx
=
0
;
float
pf_replay_gain
[
AUDIO_REPLAY_GAIN_MAX
];
float
pf_replay_gain
[
AUDIO_REPLAY_GAIN_MAX
];
...
@@ -2142,7 +2133,7 @@ static void Ogg_ExtractXiphMeta( demux_t *p_demux, es_format_t *p_fmt,
...
@@ -2142,7 +2133,7 @@ static void Ogg_ExtractXiphMeta( demux_t *p_demux, es_format_t *p_fmt,
pf_replay_gain
[
i
]
=
0
;
pf_replay_gain
[
i
]
=
0
;
pf_replay_peak
[
i
]
=
0
;
pf_replay_peak
[
i
]
=
0
;
}
}
vorbis_ParseComment
(
&
p_ogg
->
p_meta
,
(
uint8_t
*
)
pp_data
[
1
]
+
i_skip
,
pi_size
[
1
]
-
i_skip
,
vorbis_ParseComment
(
&
p_ogg
->
p_meta
,
p_headers
,
i_headers
,
&
p_ogg
->
i_attachments
,
&
p_ogg
->
attachments
,
&
p_ogg
->
i_attachments
,
&
p_ogg
->
attachments
,
&
i_cover_score
,
&
i_cover_idx
,
&
i_cover_score
,
&
i_cover_idx
,
&
p_ogg
->
i_seekpoints
,
&
p_ogg
->
pp_seekpoints
,
&
p_ogg
->
i_seekpoints
,
&
p_ogg
->
pp_seekpoints
,
...
@@ -2170,13 +2161,29 @@ static void Ogg_ExtractXiphMeta( demux_t *p_demux, es_format_t *p_fmt,
...
@@ -2170,13 +2161,29 @@ static void Ogg_ExtractXiphMeta( demux_t *p_demux, es_format_t *p_fmt,
msg_Dbg
(
p_demux
,
"setting replay peak %d to %f"
,
i
,
pf_replay_gain
[
i
]
);
msg_Dbg
(
p_demux
,
"setting replay peak %d to %f"
,
i
,
pf_replay_gain
[
i
]
);
}
}
}
}
}
if
(
p_ogg
->
i_seekpoints
>
1
)
if
(
p_ogg
->
i_seekpoints
>
1
)
{
{
p_demux
->
info
.
i_update
|=
INPUT_UPDATE_TITLE_LIST
;
p_demux
->
info
.
i_update
|=
INPUT_UPDATE_TITLE_LIST
;
}
}
}
}
static
void
Ogg_ExtractXiphMeta
(
demux_t
*
p_demux
,
es_format_t
*
p_fmt
,
const
void
*
p_headers
,
unsigned
i_headers
,
unsigned
i_skip
)
{
unsigned
pi_size
[
XIPH_MAX_HEADER_COUNT
];
void
*
pp_data
[
XIPH_MAX_HEADER_COUNT
];
unsigned
i_count
;
if
(
xiph_SplitHeaders
(
pi_size
,
pp_data
,
&
i_count
,
i_headers
,
p_headers
)
)
return
;
/* TODO how to handle multiple comments properly ? */
if
(
i_count
>=
2
&&
pi_size
[
1
]
>
i_skip
)
{
Ogg_ExtractComments
(
p_demux
,
p_fmt
,
(
uint8_t
*
)
pp_data
[
1
]
+
i_skip
,
pi_size
[
1
]
-
i_skip
);
}
}
static
void
Ogg_ExtractMeta
(
demux_t
*
p_demux
,
es_format_t
*
p_fmt
,
const
uint8_t
*
p_headers
,
int
i_headers
)
static
void
Ogg_ExtractMeta
(
demux_t
*
p_demux
,
es_format_t
*
p_fmt
,
const
uint8_t
*
p_headers
,
int
i_headers
)
{
{
demux_sys_t
*
p_ogg
=
p_demux
->
p_sys
;
demux_sys_t
*
p_ogg
=
p_demux
->
p_sys
;
...
...
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