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
1909dbf1
Commit
1909dbf1
authored
Oct 27, 2012
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ffmpeg: use av_rescale_delta() for audio stream copy
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
2bcbdd84
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
ffmpeg.c
ffmpeg.c
+9
-0
No files found.
ffmpeg.c
View file @
1909dbf1
...
@@ -1360,6 +1360,15 @@ static void do_streamcopy(InputStream *ist, OutputStream *ost, const AVPacket *p
...
@@ -1360,6 +1360,15 @@ static void do_streamcopy(InputStream *ist, OutputStream *ost, const AVPacket *p
opkt
.
dts
=
av_rescale_q
(
pkt
->
dts
,
ist
->
st
->
time_base
,
ost
->
st
->
time_base
);
opkt
.
dts
=
av_rescale_q
(
pkt
->
dts
,
ist
->
st
->
time_base
,
ost
->
st
->
time_base
);
opkt
.
dts
-=
ost_tb_start_time
;
opkt
.
dts
-=
ost_tb_start_time
;
if
(
ost
->
st
->
codec
->
codec_type
==
AVMEDIA_TYPE_AUDIO
&&
pkt
->
dts
!=
AV_NOPTS_VALUE
)
{
int
duration
=
av_get_audio_frame_duration
(
ist
->
st
->
codec
,
pkt
->
size
);
if
(
!
duration
)
duration
=
ist
->
st
->
codec
->
frame_size
;
opkt
.
dts
=
opkt
.
pts
=
av_rescale_delta
(
ist
->
st
->
time_base
,
pkt
->
dts
,
(
AVRational
){
1
,
ist
->
st
->
codec
->
sample_rate
},
duration
,
&
ist
->
filter_in_rescale_delta_last
,
ost
->
st
->
time_base
);
}
opkt
.
duration
=
av_rescale_q
(
pkt
->
duration
,
ist
->
st
->
time_base
,
ost
->
st
->
time_base
);
opkt
.
duration
=
av_rescale_q
(
pkt
->
duration
,
ist
->
st
->
time_base
,
ost
->
st
->
time_base
);
opkt
.
flags
=
pkt
->
flags
;
opkt
.
flags
=
pkt
->
flags
;
...
...
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