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
78d82649
Commit
78d82649
authored
Dec 04, 2008
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed mp4 for audio stream that need alignment (qcelp, adpcm).
parent
e01af7eb
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
9 deletions
+15
-9
modules/demux/mp4/mp4.c
modules/demux/mp4/mp4.c
+15
-9
No files found.
modules/demux/mp4/mp4.c
View file @
78d82649
...
@@ -1692,7 +1692,6 @@ static int TrackCreateES( demux_t *p_demux, mp4_track_t *p_track,
...
@@ -1692,7 +1692,6 @@ static int TrackCreateES( demux_t *p_demux, mp4_track_t *p_track,
break
;
break
;
case
VLC_FOURCC
(
'Q'
,
'D'
,
'M'
,
'C'
):
case
VLC_FOURCC
(
'Q'
,
'D'
,
'M'
,
'C'
):
case
VLC_FOURCC
(
'Q'
,
'D'
,
'M'
,
'2'
):
case
VLC_FOURCC
(
'Q'
,
'D'
,
'M'
,
'2'
):
case
VLC_FOURCC
(
'Q'
,
'c'
,
'l'
,
'p'
):
case
VLC_FOURCC
(
's'
,
'a'
,
'm'
,
'r'
):
case
VLC_FOURCC
(
's'
,
'a'
,
'm'
,
'r'
):
case
VLC_FOURCC
(
'a'
,
'l'
,
'a'
,
'c'
):
case
VLC_FOURCC
(
'a'
,
'l'
,
'a'
,
'c'
):
p_track
->
fmt
.
i_extra
=
p_track
->
fmt
.
i_extra
=
...
@@ -1730,6 +1729,7 @@ static int TrackCreateES( demux_t *p_demux, mp4_track_t *p_track,
...
@@ -1730,6 +1729,7 @@ static int TrackCreateES( demux_t *p_demux, mp4_track_t *p_track,
case
VLC_FOURCC
(
'm'
,
's'
,
0x00
,
0x02
):
case
VLC_FOURCC
(
'm'
,
's'
,
0x00
,
0x02
):
case
VLC_FOURCC
(
'm'
,
's'
,
0x00
,
0x11
):
case
VLC_FOURCC
(
'm'
,
's'
,
0x00
,
0x11
):
case
VLC_FOURCC
(
'Q'
,
'c'
,
'l'
,
'p'
):
p_track
->
fmt
.
audio
.
i_blockalign
=
p_sample
->
data
.
p_sample_soun
->
i_bytes_per_frame
;
p_track
->
fmt
.
audio
.
i_blockalign
=
p_sample
->
data
.
p_sample_soun
->
i_bytes_per_frame
;
break
;
break
;
...
@@ -2389,8 +2389,11 @@ static int MP4_TrackSampleSize( mp4_track_t *p_track )
...
@@ -2389,8 +2389,11 @@ static int MP4_TrackSampleSize( mp4_track_t *p_track )
if
(
p_soun
->
i_qt_version
==
1
)
if
(
p_soun
->
i_qt_version
==
1
)
{
{
i_size
=
p_track
->
chunk
[
p_track
->
i_chunk
].
i_sample_count
/
int
i_samples
=
p_track
->
chunk
[
p_track
->
i_chunk
].
i_sample_count
;
p_soun
->
i_sample_per_packet
*
p_soun
->
i_bytes_per_frame
;
if
(
p_track
->
fmt
.
audio
.
i_blockalign
>
1
)
i_samples
=
p_soun
->
i_sample_per_packet
;
i_size
=
i_samples
/
p_soun
->
i_sample_per_packet
*
p_soun
->
i_bytes_per_frame
;
}
}
else
if
(
p_track
->
i_sample_size
>
256
)
else
if
(
p_track
->
i_sample_size
>
256
)
{
{
...
@@ -2433,8 +2436,10 @@ static uint64_t MP4_TrackGetPos( mp4_track_t *p_track )
...
@@ -2433,8 +2436,10 @@ static uint64_t MP4_TrackGetPos( mp4_track_t *p_track )
}
}
else
else
{
{
/* we read chunk by chunk */
/* we read chunk by chunk unless a blockalign is requested */
i_pos
+=
0
;
if
(
p_track
->
fmt
.
audio
.
i_blockalign
>
1
)
i_pos
+=
(
p_track
->
i_sample
-
p_track
->
chunk
[
p_track
->
i_chunk
].
i_sample_first
)
/
p_soun
->
i_sample_per_packet
*
p_soun
->
i_bytes_per_frame
;
}
}
}
}
else
else
...
@@ -2459,10 +2464,11 @@ static int MP4_TrackNextSample( demux_t *p_demux, mp4_track_t *p_track )
...
@@ -2459,10 +2464,11 @@ static int MP4_TrackNextSample( demux_t *p_demux, mp4_track_t *p_track )
if
(
p_soun
->
i_qt_version
==
1
)
if
(
p_soun
->
i_qt_version
==
1
)
{
{
/* chunk by chunk */
/* we read chunk by chunk unless a blockalign is requested */
p_track
->
i_sample
=
if
(
p_track
->
fmt
.
audio
.
i_blockalign
>
1
)
p_track
->
chunk
[
p_track
->
i_chunk
].
i_sample_first
+
p_track
->
i_sample
+=
p_soun
->
i_sample_per_packet
;
p_track
->
chunk
[
p_track
->
i_chunk
].
i_sample_count
;
else
p_track
->
i_sample
+=
p_track
->
chunk
[
p_track
->
i_chunk
].
i_sample_count
;
}
}
else
if
(
p_track
->
i_sample_size
>
256
)
else
if
(
p_track
->
i_sample_size
>
256
)
{
{
...
...
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