Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Steve Lhomme
VLC
Commits
d9e604e4
Commit
d9e604e4
authored
May 12, 2017
by
François Cartegnie
🤞
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
demux: mp4: invalidate channels before e/ac3 specific boxes
parent
ee2e09bc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
8 deletions
+12
-8
modules/demux/mp4/essetup.c
modules/demux/mp4/essetup.c
+12
-8
No files found.
modules/demux/mp4/essetup.c
View file @
d9e604e4
...
...
@@ -925,22 +925,28 @@ int SetupAudioES( demux_t *p_demux, mp4_track_t *p_track, MP4_Box_t *p_sample )
}
case
(
ATOM_eac3
):
{
const
MP4_Box_t
*
p_dec3
=
MP4_BoxGet
(
p_sample
,
"dec3"
,
0
);
p_track
->
fmt
.
i_codec
=
VLC_CODEC_EAC3
;
/* TS 102.366. F6 The values of the ChannelCount and SampleSize fields
* within the EC3SampleEntry Box shall be ignored. */
p_track
->
fmt
.
audio
.
i_channels
=
0
;
p_track
->
fmt
.
audio
.
i_bitspersample
=
0
;
const
MP4_Box_t
*
p_dec3
=
MP4_BoxGet
(
p_sample
,
"dec3"
,
0
);
if
(
p_dec3
&&
BOXDATA
(
p_dec3
)
)
{
p_track
->
fmt
.
audio
.
i_channels
=
0
;
p_track
->
fmt
.
i_bitrate
=
BOXDATA
(
p_dec3
)
->
i_data_rate
*
1000
;
p_track
->
fmt
.
audio
.
i_bitspersample
=
0
;
}
break
;
}
case
(
ATOM_ac3
):
{
MP4_Box_t
*
p_dac3
=
MP4_BoxGet
(
p_sample
,
"dac3"
,
0
);
p_track
->
fmt
.
i_codec
=
VLC_CODEC_A52
;
/* TS 102.366. F3 The values of the ChannelCount and SampleSize fields
* within the AC3SampleEntry Box shall be ignored */
p_track
->
fmt
.
audio
.
i_channels
=
0
;
p_track
->
fmt
.
audio
.
i_bitspersample
=
0
;
MP4_Box_t
*
p_dac3
=
MP4_BoxGet
(
p_sample
,
"dac3"
,
0
);
if
(
p_dac3
&&
BOXDATA
(
p_dac3
)
)
{
static
const
int
pi_bitrate
[]
=
{
...
...
@@ -950,11 +956,9 @@ int SetupAudioES( demux_t *p_demux, mp4_track_t *p_track, MP4_Box_t *p_sample )
256
,
320
,
384
,
448
,
512
,
576
,
640
,
};
p_track
->
fmt
.
audio
.
i_channels
=
0
;
p_track
->
fmt
.
i_bitrate
=
0
;
if
(
BOXDATA
(
p_dac3
)
->
i_bitrate_code
<
sizeof
(
pi_bitrate
)
/
sizeof
(
*
pi_bitrate
)
)
p_track
->
fmt
.
i_bitrate
=
pi_bitrate
[
BOXDATA
(
p_dac3
)
->
i_bitrate_code
]
*
1000
;
p_track
->
fmt
.
audio
.
i_bitspersample
=
0
;
}
break
;
}
...
...
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