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
e684d07a
Commit
e684d07a
authored
May 12, 2020
by
Steven Liu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat/hlsenc: move number out of hls_start
Signed-off-by:
Steven Liu
<
liuqi05@kuaishou.com
>
parent
ffae62d9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
4 deletions
+2
-4
hlsenc.c
libavformat/hlsenc.c
+2
-4
No files found.
libavformat/hlsenc.c
View file @
e684d07a
...
@@ -1675,7 +1675,6 @@ static int hls_start(AVFormatContext *s, VariantStream *vs)
...
@@ -1675,7 +1675,6 @@ static int hls_start(AVFormatContext *s, VariantStream *vs)
ff_format_set_url
(
vtt_oc
,
filename
);
ff_format_set_url
(
vtt_oc
,
filename
);
}
}
}
}
vs
->
number
++
;
proto
=
avio_find_protocol_name
(
oc
->
url
);
proto
=
avio_find_protocol_name
(
oc
->
url
);
use_temp_file
=
proto
&&
!
strcmp
(
proto
,
"file"
)
&&
(
c
->
flags
&
HLS_TEMP_FILE
);
use_temp_file
=
proto
&&
!
strcmp
(
proto
,
"file"
)
&&
(
c
->
flags
&
HLS_TEMP_FILE
);
...
@@ -2509,7 +2508,6 @@ static int hls_write_packet(AVFormatContext *s, AVPacket *pkt)
...
@@ -2509,7 +2508,6 @@ static int hls_write_packet(AVFormatContext *s, AVPacket *pkt)
}
}
if
(
hls
->
flags
&
HLS_SINGLE_FILE
)
{
if
(
hls
->
flags
&
HLS_SINGLE_FILE
)
{
vs
->
number
++
;
vs
->
start_pos
+=
vs
->
size
;
vs
->
start_pos
+=
vs
->
size
;
}
else
if
(
hls
->
max_seg_size
>
0
)
{
}
else
if
(
hls
->
max_seg_size
>
0
)
{
vs
->
start_pos
=
new_start_pos
;
vs
->
start_pos
=
new_start_pos
;
...
@@ -2520,14 +2518,13 @@ static int hls_write_packet(AVFormatContext *s, AVPacket *pkt)
...
@@ -2520,14 +2518,13 @@ static int hls_write_packet(AVFormatContext *s, AVPacket *pkt)
vs
->
start_pos
=
0
;
vs
->
start_pos
=
0
;
/* When split segment by byte, the duration is short than hls_time,
/* When split segment by byte, the duration is short than hls_time,
* so it is not enough one segment duration as hls_time, */
* so it is not enough one segment duration as hls_time, */
vs
->
number
--
;
}
}
vs
->
number
++
;
}
else
{
}
else
{
vs
->
start_pos
=
new_start_pos
;
vs
->
start_pos
=
new_start_pos
;
sls_flag_file_rename
(
hls
,
vs
,
old_filename
);
sls_flag_file_rename
(
hls
,
vs
,
old_filename
);
ret
=
hls_start
(
s
,
vs
);
ret
=
hls_start
(
s
,
vs
);
}
}
vs
->
number
++
;
av_freep
(
&
old_filename
);
av_freep
(
&
old_filename
);
if
(
ret
<
0
)
{
if
(
ret
<
0
)
{
...
@@ -2975,6 +2972,7 @@ static int hls_init(AVFormatContext *s)
...
@@ -2975,6 +2972,7 @@ static int hls_init(AVFormatContext *s)
if
((
ret
=
hls_start
(
s
,
vs
))
<
0
)
if
((
ret
=
hls_start
(
s
,
vs
))
<
0
)
return
ret
;
return
ret
;
vs
->
number
++
;
}
}
return
ret
;
return
ret
;
...
...
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