Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
2c2fc407
Commit
2c2fc407
authored
Apr 13, 2015
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
demux: mp4: really fix Qt v=0 sample_size=1
also reverts
dad98149
parent
dd9aa436
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
6 deletions
+20
-6
modules/demux/mp4/mp4.c
modules/demux/mp4/mp4.c
+20
-6
No files found.
modules/demux/mp4/mp4.c
View file @
2c2fc407
...
@@ -3006,7 +3006,24 @@ static int MP4_TrackSeek( demux_t *p_demux, mp4_track_t *p_track,
...
@@ -3006,7 +3006,24 @@ static int MP4_TrackSeek( demux_t *p_demux, mp4_track_t *p_track,
* 3 types: for audio
* 3 types: for audio
*
*
*/
*/
#define QT_V0_MAX_SAMPLES 2048
static
inline
uint32_t
MP4_GetFixedSampleSize
(
const
mp4_track_t
*
p_track
,
const
MP4_Box_data_sample_soun_t
*
p_soun
)
{
uint32_t
i_size
=
0
;
assert
(
p_track
->
i_sample_size
!=
0
);
/* broken stsz sample size == 1 */
if
(
p_track
->
fmt
.
i_cat
==
AUDIO_ES
&&
p_track
->
i_sample_size
==
1
&&
p_soun
->
i_samplesize
>
p_track
->
i_sample_size
*
8
)
i_size
=
p_soun
->
i_samplesize
*
p_soun
->
i_channelcount
/
8
;
else
i_size
=
p_track
->
i_sample_size
;
return
i_size
;
}
#define QT_V0_MAX_SAMPLES 1024
static
uint32_t
MP4_TrackGetReadSize
(
mp4_track_t
*
p_track
,
uint32_t
*
pi_nb_samples
)
static
uint32_t
MP4_TrackGetReadSize
(
mp4_track_t
*
p_track
,
uint32_t
*
pi_nb_samples
)
{
{
uint32_t
i_size
=
0
;
uint32_t
i_size
=
0
;
...
@@ -3097,11 +3114,8 @@ static uint32_t MP4_TrackGetReadSize( mp4_track_t *p_track, uint32_t *pi_nb_samp
...
@@ -3097,11 +3114,8 @@ static uint32_t MP4_TrackGetReadSize( mp4_track_t *p_track, uint32_t *pi_nb_samp
(
*
pi_nb_samples
)
++
;
(
*
pi_nb_samples
)
++
;
if
(
p_track
->
i_sample_size
==
0
)
if
(
p_track
->
i_sample_size
==
0
)
i_size
+=
p_track
->
p_sample_size
[
i
];
i_size
+=
p_track
->
p_sample_size
[
i
];
/* broken stsz sample size == 1 */
else
if
(
p_track
->
i_sample_size
==
1
&&
p_soun
->
i_samplesize
>
p_track
->
i_sample_size
*
8
)
i_size
+=
p_soun
->
i_samplesize
*
p_soun
->
i_channelcount
/
8
;
else
else
i_size
+=
p_track
->
i_sample_size
;
i_size
+=
MP4_GetFixedSampleSize
(
p_track
,
p_soun
)
;
/* Try to detect compression in ISO */
/* Try to detect compression in ISO */
if
(
p_soun
->
i_compressionid
!=
0
)
if
(
p_soun
->
i_compressionid
!=
0
)
...
@@ -3137,7 +3151,7 @@ static uint64_t MP4_TrackGetPos( mp4_track_t *p_track )
...
@@ -3137,7 +3151,7 @@ static uint64_t MP4_TrackGetPos( mp4_track_t *p_track )
{
{
i_pos
+=
(
p_track
->
i_sample
-
i_pos
+=
(
p_track
->
i_sample
-
p_track
->
chunk
[
p_track
->
i_chunk
].
i_sample_first
)
*
p_track
->
chunk
[
p_track
->
i_chunk
].
i_sample_first
)
*
p_track
->
i_sample_size
;
MP4_GetFixedSampleSize
(
p_track
,
p_soun
)
;
}
}
else
else
{
{
...
...
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