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
3c5ab022
Commit
3c5ab022
authored
Apr 09, 2012
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mp4: reindent and regroup
parent
9ad094db
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
77 additions
and
77 deletions
+77
-77
modules/demux/mp4/mp4.c
modules/demux/mp4/mp4.c
+77
-77
No files found.
modules/demux/mp4/mp4.c
View file @
3c5ab022
...
@@ -1528,82 +1528,6 @@ static int TrackCreateES( demux_t *p_demux, mp4_track_t *p_track,
...
@@ -1528,82 +1528,6 @@ static int TrackCreateES( demux_t *p_demux, mp4_track_t *p_track,
p_pasp
=
MP4_BoxGet
(
p_sample
,
"pasp"
);
p_pasp
=
MP4_BoxGet
(
p_sample
,
"pasp"
);
if
(
p_track
->
fmt
.
i_cat
==
AUDIO_ES
&&
(
p_track
->
i_sample_size
==
1
||
p_track
->
i_sample_size
==
2
)
)
{
MP4_Box_data_sample_soun_t
*
p_soun
;
p_soun
=
p_sample
->
data
.
p_sample_soun
;
if
(
p_soun
->
i_qt_version
==
0
)
{
switch
(
p_sample
->
i_type
)
{
case
VLC_FOURCC
(
'i'
,
'm'
,
'a'
,
'4'
):
p_soun
->
i_qt_version
=
1
;
p_soun
->
i_sample_per_packet
=
64
;
p_soun
->
i_bytes_per_packet
=
34
;
p_soun
->
i_bytes_per_frame
=
34
*
p_soun
->
i_channelcount
;
p_soun
->
i_bytes_per_sample
=
2
;
break
;
case
VLC_FOURCC
(
'M'
,
'A'
,
'C'
,
'3'
):
p_soun
->
i_qt_version
=
1
;
p_soun
->
i_sample_per_packet
=
6
;
p_soun
->
i_bytes_per_packet
=
2
;
p_soun
->
i_bytes_per_frame
=
2
*
p_soun
->
i_channelcount
;
p_soun
->
i_bytes_per_sample
=
2
;
break
;
case
VLC_FOURCC
(
'M'
,
'A'
,
'C'
,
'6'
):
p_soun
->
i_qt_version
=
1
;
p_soun
->
i_sample_per_packet
=
12
;
p_soun
->
i_bytes_per_packet
=
2
;
p_soun
->
i_bytes_per_frame
=
2
*
p_soun
->
i_channelcount
;
p_soun
->
i_bytes_per_sample
=
2
;
break
;
case
VLC_FOURCC
(
'a'
,
'l'
,
'a'
,
'w'
):
case
VLC_FOURCC
(
'u'
,
'l'
,
'a'
,
'w'
):
p_soun
->
i_samplesize
=
8
;
p_track
->
i_sample_size
=
p_soun
->
i_channelcount
;
break
;
case
VLC_FOURCC
(
'N'
,
'O'
,
'N'
,
'E'
):
case
VLC_FOURCC
(
'r'
,
'a'
,
'w'
,
' '
):
case
VLC_FOURCC
(
't'
,
'w'
,
'o'
,
's'
):
case
VLC_FOURCC
(
's'
,
'o'
,
'w'
,
't'
):
/* What would be the fun if you could trust the .mov */
p_track
->
i_sample_size
=
((
p_soun
->
i_samplesize
+
7
)
/
8
)
*
p_soun
->
i_channelcount
;
break
;
default:
break
;
}
}
else
if
(
p_soun
->
i_qt_version
==
1
&&
p_soun
->
i_sample_per_packet
<=
0
)
{
p_soun
->
i_qt_version
=
0
;
}
}
else
if
(
p_track
->
fmt
.
i_cat
==
AUDIO_ES
&&
p_sample
->
data
.
p_sample_soun
->
i_qt_version
==
1
)
{
MP4_Box_data_sample_soun_t
*
p_soun
=
p_sample
->
data
.
p_sample_soun
;
switch
(
p_sample
->
i_type
)
{
case
(
VLC_FOURCC
(
'.'
,
'm'
,
'p'
,
'3'
)
):
case
(
VLC_FOURCC
(
'm'
,
's'
,
0x00
,
0x55
)
):
{
if
(
p_track
->
i_sample_size
>
1
)
p_soun
->
i_qt_version
=
0
;
break
;
}
case
(
VLC_FOURCC
(
'a'
,
'c'
,
'-'
,
'3'
)
):
case
(
VLC_FOURCC
(
'e'
,
'c'
,
'-'
,
'3'
)
):
case
(
VLC_FOURCC
(
'm'
,
's'
,
0x20
,
0x00
)
):
p_soun
->
i_qt_version
=
0
;
break
;
default:
break
;
}
}
/* */
/* */
switch
(
p_track
->
fmt
.
i_cat
)
switch
(
p_track
->
fmt
.
i_cat
)
{
{
...
@@ -1657,8 +1581,84 @@ static int TrackCreateES( demux_t *p_demux, mp4_track_t *p_track,
...
@@ -1657,8 +1581,84 @@ static int TrackCreateES( demux_t *p_demux, mp4_track_t *p_track,
p_track
->
fmt
.
audio
.
i_bitspersample
=
p_track
->
fmt
.
audio
.
i_bitspersample
=
p_sample
->
data
.
p_sample_soun
->
i_samplesize
;
p_sample
->
data
.
p_sample_soun
->
i_samplesize
;
if
(
(
p_track
->
i_sample_size
==
1
||
p_track
->
i_sample_size
==
2
)
)
{
MP4_Box_data_sample_soun_t
*
p_soun
;
p_soun
=
p_sample
->
data
.
p_sample_soun
;
if
(
p_soun
->
i_qt_version
==
0
)
{
switch
(
p_sample
->
i_type
)
{
case
VLC_FOURCC
(
'i'
,
'm'
,
'a'
,
'4'
):
p_soun
->
i_qt_version
=
1
;
p_soun
->
i_sample_per_packet
=
64
;
p_soun
->
i_bytes_per_packet
=
34
;
p_soun
->
i_bytes_per_frame
=
34
*
p_soun
->
i_channelcount
;
p_soun
->
i_bytes_per_sample
=
2
;
break
;
case
VLC_FOURCC
(
'M'
,
'A'
,
'C'
,
'3'
):
p_soun
->
i_qt_version
=
1
;
p_soun
->
i_sample_per_packet
=
6
;
p_soun
->
i_bytes_per_packet
=
2
;
p_soun
->
i_bytes_per_frame
=
2
*
p_soun
->
i_channelcount
;
p_soun
->
i_bytes_per_sample
=
2
;
break
;
case
VLC_FOURCC
(
'M'
,
'A'
,
'C'
,
'6'
):
p_soun
->
i_qt_version
=
1
;
p_soun
->
i_sample_per_packet
=
12
;
p_soun
->
i_bytes_per_packet
=
2
;
p_soun
->
i_bytes_per_frame
=
2
*
p_soun
->
i_channelcount
;
p_soun
->
i_bytes_per_sample
=
2
;
break
;
case
VLC_FOURCC
(
'a'
,
'l'
,
'a'
,
'w'
):
case
VLC_FOURCC
(
'u'
,
'l'
,
'a'
,
'w'
):
p_soun
->
i_samplesize
=
8
;
p_track
->
i_sample_size
=
p_soun
->
i_channelcount
;
break
;
case
VLC_FOURCC
(
'N'
,
'O'
,
'N'
,
'E'
):
case
VLC_FOURCC
(
'r'
,
'a'
,
'w'
,
' '
):
case
VLC_FOURCC
(
't'
,
'w'
,
'o'
,
's'
):
case
VLC_FOURCC
(
's'
,
'o'
,
'w'
,
't'
):
/* What would be the fun if you could trust the .mov */
p_track
->
i_sample_size
=
((
p_soun
->
i_samplesize
+
7
)
/
8
)
*
p_soun
->
i_channelcount
;
break
;
default:
break
;
}
}
else
if
(
p_soun
->
i_qt_version
==
1
&&
p_soun
->
i_sample_per_packet
<=
0
)
{
p_soun
->
i_qt_version
=
0
;
}
}
else
if
(
p_sample
->
data
.
p_sample_soun
->
i_qt_version
==
1
)
{
MP4_Box_data_sample_soun_t
*
p_soun
=
p_sample
->
data
.
p_sample_soun
;
switch
(
p_sample
->
i_type
)
{
case
(
VLC_FOURCC
(
'.'
,
'm'
,
'p'
,
'3'
)
):
case
(
VLC_FOURCC
(
'm'
,
's'
,
0x00
,
0x55
)
):
{
if
(
p_track
->
i_sample_size
>
1
)
p_soun
->
i_qt_version
=
0
;
break
;
}
case
(
VLC_FOURCC
(
'a'
,
'c'
,
'-'
,
'3'
)
):
case
(
VLC_FOURCC
(
'e'
,
'c'
,
'-'
,
'3'
)
):
case
(
VLC_FOURCC
(
'm'
,
's'
,
0x20
,
0x00
)
):
p_soun
->
i_qt_version
=
0
;
break
;
default:
break
;
}
}
if
(
p_track
->
i_sample_size
!=
0
&&
if
(
p_track
->
i_sample_size
!=
0
&&
p_sample
->
data
.
p_sample_soun
->
i_qt_version
==
1
&&
p_sample
->
data
.
p_sample_soun
->
i_sample_per_packet
<=
0
)
p_sample
->
data
.
p_sample_soun
->
i_qt_version
==
1
&&
p_sample
->
data
.
p_sample_soun
->
i_sample_per_packet
<=
0
)
{
{
msg_Err
(
p_demux
,
"Invalid sample per packet value for qt_version 1"
);
msg_Err
(
p_demux
,
"Invalid sample per packet value for qt_version 1"
);
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
...
...
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