Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
558f4d33
Commit
558f4d33
authored
Apr 30, 2003
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* mp4: fix playback of some stream with raw audio. I also split
big audio chunk. (Avoid 100000 samples at once :(
parent
ef59c8fc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
15 deletions
+46
-15
modules/demux/mp4/mp4.c
modules/demux/mp4/mp4.c
+46
-15
No files found.
modules/demux/mp4/mp4.c
View file @
558f4d33
...
...
@@ -2,7 +2,7 @@
* mp4.c : MP4 file input module for vlc
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: mp4.c,v 1.2
6 2003/04/25 21:47:25
fenrir Exp $
* $Id: mp4.c,v 1.2
7 2003/04/30 21:45:52
fenrir Exp $
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
* This program is free software; you can redistribute it and/or modify
...
...
@@ -1488,6 +1488,24 @@ static void MP4_TrackCreate( input_thread_t *p_input,
return
;
}
/* fxi i_timescale for AUDIO_ES with i_qt_version == 0 */
if
(
p_track
->
i_cat
==
AUDIO_ES
)
//&& p_track->i_sample_size == 1 )
{
MP4_Box_t
*
p_sample
;
p_sample
=
MP4_BoxGet
(
p_track
->
p_stsd
,
"[0]"
);
if
(
p_sample
)
{
MP4_Box_data_sample_soun_t
*
p_soun
=
p_sample
->
data
.
p_sample_soun
;
if
(
p_soun
->
i_qt_version
==
0
&&
p_track
->
i_timescale
!=
p_soun
->
i_sampleratehi
)
{
msg_Warn
(
p_input
,
"i_timescale != i_sampleratehi with qt_version == 0
\n
Making both equal ? (report any problem)"
);
p_track
->
i_timescale
=
p_soun
->
i_sampleratehi
;
}
}
}
/* Create chunk index table */
if
(
TrackCreateChunksIndex
(
p_input
,
p_track
)
)
{
...
...
@@ -1667,7 +1685,7 @@ static int MP4_TrackSeek ( input_thread_t *p_input,
* 3 types: for audio
*
*/
#define QT_V0_MAX_SAMPLES 1500
static
int
MP4_TrackSampleSize
(
track_data_mp4_t
*
p_track
)
{
int
i_size
;
...
...
@@ -1697,10 +1715,14 @@ static int MP4_TrackSampleSize( track_data_mp4_t *p_track )
}
else
{
//msg_Warn( p_input, "i_qt_version == 0" );
/* FIXME */
i_size
=
p_track
->
chunk
[
p_track
->
i_chunk
].
i_sample_count
*
p_soun
->
i_channelcount
*
p_soun
->
i_samplesize
/
8
;
int
i_samples
=
p_track
->
chunk
[
p_track
->
i_chunk
].
i_sample_count
-
(
p_track
->
i_sample
-
p_track
->
chunk
[
p_track
->
i_chunk
].
i_sample_first
);
if
(
i_samples
>
QT_V0_MAX_SAMPLES
)
{
i_samples
=
QT_V0_MAX_SAMPLES
;
}
i_size
=
i_samples
*
p_soun
->
i_channelcount
*
p_soun
->
i_samplesize
/
8
;
}
//fprintf( stderr, "size=%d\n", i_size );
...
...
@@ -1718,13 +1740,18 @@ static uint64_t MP4_GetTrackPos( track_data_mp4_t *p_track )
if
(
p_track
->
i_sample_size
)
{
#if 0
i_pos += ( p_track->i_sample -
p_track->chunk[p_track->i_chunk].i_sample_first ) *
MP4_TrackSampleSize( p_track );
#endif
/* we read chunk by chunk */
i_pos
+=
0
;
MP4_Box_data_sample_soun_t
*
p_soun
=
p_track
->
p_sample
->
data
.
p_sample_soun
;
if
(
p_soun
->
i_qt_version
==
0
)
{
i_pos
+=
(
p_track
->
i_sample
-
p_track
->
chunk
[
p_track
->
i_chunk
].
i_sample_first
)
*
p_soun
->
i_channelcount
*
p_soun
->
i_samplesize
/
8
;
}
else
{
/* we read chunk by chunk */
i_pos
+=
0
;
}
}
else
{
...
...
@@ -1759,9 +1786,13 @@ static int MP4_TrackNextSample( input_thread_t *p_input,
else
{
/* FIXME */
p_track
->
i_sample
=
p_track
->
chunk
[
p_track
->
i_chunk
].
i_sample_first
+
p_track
->
chunk
[
p_track
->
i_chunk
].
i_sample_count
;
p_track
->
i_sample
+=
QT_V0_MAX_SAMPLES
;
if
(
p_track
->
i_sample
>
p_track
->
chunk
[
p_track
->
i_chunk
].
i_sample_first
+
p_track
->
chunk
[
p_track
->
i_chunk
].
i_sample_count
)
{
p_track
->
i_sample
=
p_track
->
chunk
[
p_track
->
i_chunk
].
i_sample_first
+
p_track
->
chunk
[
p_track
->
i_chunk
].
i_sample_count
;
}
}
}
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