Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
4da374f8
Commit
4da374f8
authored
Jan 11, 2012
by
Justin Ruggles
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
segafilm: use the sample rate as the time base for audio streams
parent
ea289186
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
segafilm.c
libavformat/segafilm.c
+7
-4
No files found.
libavformat/segafilm.c
View file @
4da374f8
...
...
@@ -196,8 +196,13 @@ static int film_read_header(AVFormatContext *s)
if
(
!
film
->
sample_table
)
return
AVERROR
(
ENOMEM
);
for
(
i
=
0
;
i
<
s
->
nb_streams
;
i
++
)
avpriv_set_pts_info
(
s
->
streams
[
i
],
33
,
1
,
film
->
base_clock
);
for
(
i
=
0
;
i
<
s
->
nb_streams
;
i
++
)
{
st
=
s
->
streams
[
i
];
if
(
st
->
codec
->
codec_type
==
AVMEDIA_TYPE_VIDEO
)
avpriv_set_pts_info
(
st
,
33
,
1
,
film
->
base_clock
);
else
avpriv_set_pts_info
(
st
,
64
,
1
,
film
->
audio_samplerate
);
}
audio_frame_counter
=
0
;
for
(
i
=
0
;
i
<
film
->
sample_count
;
i
++
)
{
...
...
@@ -212,8 +217,6 @@ static int film_read_header(AVFormatContext *s)
if
(
AV_RB32
(
&
scratch
[
8
])
==
0xFFFFFFFF
)
{
film
->
sample_table
[
i
].
stream
=
film
->
audio_stream_index
;
film
->
sample_table
[
i
].
pts
=
audio_frame_counter
;
film
->
sample_table
[
i
].
pts
*=
film
->
base_clock
;
film
->
sample_table
[
i
].
pts
/=
film
->
audio_samplerate
;
if
(
film
->
audio_type
==
CODEC_ID_ADPCM_ADX
)
audio_frame_counter
+=
(
film
->
sample_table
[
i
].
sample_size
*
32
/
...
...
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