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
afc9003f
Commit
afc9003f
authored
Jun 11, 2014
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
demux: mp4: fix grouped compressed samples reading (fix #11601)
parent
0e89cd61
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
modules/demux/mp4/mp4.c
modules/demux/mp4/mp4.c
+8
-5
No files found.
modules/demux/mp4/mp4.c
View file @
afc9003f
...
@@ -3359,7 +3359,6 @@ static uint32_t MP4_TrackGetReadSize( mp4_track_t *p_track, uint32_t *pi_nb_samp
...
@@ -3359,7 +3359,6 @@ static uint32_t MP4_TrackGetReadSize( mp4_track_t *p_track, uint32_t *pi_nb_samp
const
MP4_Box_data_sample_soun_t
*
p_soun
=
p_track
->
p_sample
->
data
.
p_sample_soun
;
const
MP4_Box_data_sample_soun_t
*
p_soun
=
p_track
->
p_sample
->
data
.
p_sample_soun
;
const
mp4_chunk_t
*
p_chunk
=
&
p_track
->
chunk
[
p_track
->
i_chunk
];
const
mp4_chunk_t
*
p_chunk
=
&
p_track
->
chunk
[
p_track
->
i_chunk
];
uint32_t
i_max_samples
=
p_chunk
->
i_sample_count
-
p_chunk
->
i_sample
+
1
;
uint32_t
i_max_samples
=
p_chunk
->
i_sample_count
-
p_chunk
->
i_sample
+
1
;
i_max_samples
=
__MIN
(
i_max_samples
,
QT_V0_MAX_SAMPLES
);
/* Group audio packets so we don't call demux for single sample unit */
/* Group audio packets so we don't call demux for single sample unit */
if
(
p_track
->
fmt
.
i_original_fourcc
==
VLC_CODEC_DVD_LPCM
&&
if
(
p_track
->
fmt
.
i_original_fourcc
==
VLC_CODEC_DVD_LPCM
&&
...
@@ -3383,12 +3382,15 @@ static uint32_t MP4_TrackGetReadSize( mp4_track_t *p_track, uint32_t *pi_nb_samp
...
@@ -3383,12 +3382,15 @@ static uint32_t MP4_TrackGetReadSize( mp4_track_t *p_track, uint32_t *pi_nb_samp
if
(
p_soun
->
i_qt_version
==
1
)
if
(
p_soun
->
i_qt_version
==
1
)
{
{
if
(
p_soun
->
i_compressionid
!=
0
)
if
(
p_soun
->
i_compressionid
!=
0
||
p_soun
->
i_bytes_per_sample
>
1
)
/* compressed */
{
{
/* in this case we are dealing with compressed data
/* in this case we are dealing with compressed data
-2 in V1: additional fields are meaningless (VBR and such) */
-2 in V1: additional fields are meaningless (VBR and such) */
i_size
=
p_track
->
i_sample_size
;
*
pi_nb_samples
=
i_max_samples
;
//p_track->chunk[p_track->i_chunk].i_sample_count;
*
pi_nb_samples
=
1
;
if
(
p_track
->
fmt
.
audio
.
i_blockalign
>
1
)
*
pi_nb_samples
=
p_soun
->
i_sample_per_packet
;
i_size
=
*
pi_nb_samples
/
p_soun
->
i_sample_per_packet
*
p_soun
->
i_bytes_per_frame
;
return
i_size
;
}
}
else
/* uncompressed case */
else
/* uncompressed case */
{
{
...
@@ -3403,10 +3405,11 @@ static uint32_t MP4_TrackGetReadSize( mp4_track_t *p_track, uint32_t *pi_nb_samp
...
@@ -3403,10 +3405,11 @@ static uint32_t MP4_TrackGetReadSize( mp4_track_t *p_track, uint32_t *pi_nb_samp
*
pi_nb_samples
=
i_packets
*
p_soun
->
i_sample_per_packet
;
*
pi_nb_samples
=
i_packets
*
p_soun
->
i_sample_per_packet
;
i_size
=
i_packets
*
p_soun
->
i_bytes_per_frame
;
i_size
=
i_packets
*
p_soun
->
i_bytes_per_frame
;
return
i_size
;
}
}
}
}
/* uncompressed */
/* uncompressed
v0
*/
*
pi_nb_samples
=
0
;
*
pi_nb_samples
=
0
;
for
(
uint32_t
i
=
p_track
->
i_sample
;
for
(
uint32_t
i
=
p_track
->
i_sample
;
i
<
p_chunk
->
i_sample_first
+
p_chunk
->
i_sample_count
&&
i
<
p_chunk
->
i_sample_first
+
p_chunk
->
i_sample_count
&&
...
...
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