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
c329195a
Commit
c329195a
authored
Apr 26, 2013
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat/mux: use a local variable for offset
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
060f14f4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
mux.c
libavformat/mux.c
+5
-4
No files found.
libavformat/mux.c
View file @
c329195a
...
...
@@ -499,14 +499,15 @@ static int write_packet(AVFormatContext *s, AVPacket *pkt)
if
(
s
->
avoid_negative_ts
>
0
)
{
AVStream
*
st
=
s
->
streams
[
pkt
->
stream_index
];
int64_t
offset
=
st
->
mux_ts_offset
;
if
(
pkt
->
dts
<
0
&&
pkt
->
dts
!=
AV_NOPTS_VALUE
&&
!
s
->
offset
)
{
s
->
offset
=
-
pkt
->
dts
;
s
->
offset_timebase
=
st
->
time_base
;
}
if
(
s
->
offset
&&
!
st
->
mux_ts_
offset
)
{
st
->
mux_ts_offset
=
if
(
s
->
offset
&&
!
offset
)
{
offset
=
st
->
mux_ts_offset
=
av_rescale_q_rnd
(
s
->
offset
,
s
->
offset_timebase
,
st
->
time_base
,
...
...
@@ -514,9 +515,9 @@ static int write_packet(AVFormatContext *s, AVPacket *pkt)
}
if
(
pkt
->
dts
!=
AV_NOPTS_VALUE
)
pkt
->
dts
+=
st
->
mux_ts_
offset
;
pkt
->
dts
+=
offset
;
if
(
pkt
->
pts
!=
AV_NOPTS_VALUE
)
pkt
->
pts
+=
st
->
mux_ts_
offset
;
pkt
->
pts
+=
offset
;
}
if
(
!
(
s
->
oformat
->
flags
&
(
AVFMT_TS_NEGATIVE
|
AVFMT_NOTIMESTAMPS
))
&&
0
)
{
...
...
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