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
5cba5291
Commit
5cba5291
authored
Mar 31, 2015
by
Rodger Combs
Committed by
Michael Niedermayer
Mar 31, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavf/segment: style nits
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
385fe984
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
segment.c
libavformat/segment.c
+4
-4
No files found.
libavformat/segment.c
View file @
5cba5291
...
@@ -226,7 +226,7 @@ static int segment_start(AVFormatContext *s, int write_header)
...
@@ -226,7 +226,7 @@ static int segment_start(AVFormatContext *s, int write_header)
}
}
seg
->
segment_idx
++
;
seg
->
segment_idx
++
;
if
((
seg
->
segment_idx_wrap
)
&&
(
seg
->
segment_idx
%
seg
->
segment_idx_wrap
==
0
))
if
((
seg
->
segment_idx_wrap
)
&&
(
seg
->
segment_idx
%
seg
->
segment_idx_wrap
==
0
))
seg
->
segment_idx_wrap_nb
++
;
seg
->
segment_idx_wrap_nb
++
;
if
((
err
=
set_segment_filename
(
s
))
<
0
)
if
((
err
=
set_segment_filename
(
s
))
<
0
)
...
@@ -761,7 +761,7 @@ static int seg_write_packet(AVFormatContext *s, AVPacket *pkt)
...
@@ -761,7 +761,7 @@ static int seg_write_packet(AVFormatContext *s, AVPacket *pkt)
int64_t
avgt
=
av_gettime
();
int64_t
avgt
=
av_gettime
();
time_t
sec
=
avgt
/
1000000
;
time_t
sec
=
avgt
/
1000000
;
localtime_r
(
&
sec
,
&
ti
);
localtime_r
(
&
sec
,
&
ti
);
usecs
=
(
int64_t
)(
ti
.
tm_hour
*
3600
+
ti
.
tm_min
*
60
+
ti
.
tm_sec
)
*
1000000
+
(
avgt
%
1000000
);
usecs
=
(
int64_t
)(
ti
.
tm_hour
*
3600
+
ti
.
tm_min
*
60
+
ti
.
tm_sec
)
*
1000000
+
(
avgt
%
1000000
);
wrapped_val
=
usecs
%
seg
->
time
;
wrapped_val
=
usecs
%
seg
->
time
;
if
(
seg
->
last_cut
!=
usecs
&&
wrapped_val
<
seg
->
last_val
)
{
if
(
seg
->
last_cut
!=
usecs
&&
wrapped_val
<
seg
->
last_val
)
{
seg
->
cut_pending
=
1
;
seg
->
cut_pending
=
1
;
...
@@ -769,7 +769,7 @@ static int seg_write_packet(AVFormatContext *s, AVPacket *pkt)
...
@@ -769,7 +769,7 @@ static int seg_write_packet(AVFormatContext *s, AVPacket *pkt)
}
}
seg
->
last_val
=
wrapped_val
;
seg
->
last_val
=
wrapped_val
;
}
else
{
}
else
{
end_pts
=
seg
->
time
*
(
seg
->
segment_count
+
1
);
end_pts
=
seg
->
time
*
(
seg
->
segment_count
+
1
);
}
}
}
}
...
@@ -797,7 +797,7 @@ static int seg_write_packet(AVFormatContext *s, AVPacket *pkt)
...
@@ -797,7 +797,7 @@ static int seg_write_packet(AVFormatContext *s, AVPacket *pkt)
goto
fail
;
goto
fail
;
seg
->
cut_pending
=
0
;
seg
->
cut_pending
=
0
;
seg
->
cur_entry
.
index
=
seg
->
segment_idx
+
seg
->
segment_idx_wrap
*
seg
->
segment_idx_wrap_nb
;
seg
->
cur_entry
.
index
=
seg
->
segment_idx
+
seg
->
segment_idx_wrap
*
seg
->
segment_idx_wrap_nb
;
seg
->
cur_entry
.
start_time
=
(
double
)
pkt
->
pts
*
av_q2d
(
st
->
time_base
);
seg
->
cur_entry
.
start_time
=
(
double
)
pkt
->
pts
*
av_q2d
(
st
->
time_base
);
seg
->
cur_entry
.
start_pts
=
av_rescale_q
(
pkt
->
pts
,
st
->
time_base
,
AV_TIME_BASE_Q
);
seg
->
cur_entry
.
start_pts
=
av_rescale_q
(
pkt
->
pts
,
st
->
time_base
,
AV_TIME_BASE_Q
);
seg
->
cur_entry
.
end_time
=
seg
->
cur_entry
.
start_time
+
seg
->
cur_entry
.
end_time
=
seg
->
cur_entry
.
start_time
+
...
...
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