Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
3add65e0
Commit
3add65e0
authored
Jul 19, 2019
by
Nicolas George
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavf/concat: implement FFSEEK_SIZE.
parent
6e1a2dc1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
concat.c
libavformat/concat.c
+6
-1
No files found.
libavformat/concat.c
View file @
3add65e0
...
@@ -38,6 +38,7 @@ struct concat_data {
...
@@ -38,6 +38,7 @@ struct concat_data {
struct
concat_nodes
*
nodes
;
///< list of nodes to concat
struct
concat_nodes
*
nodes
;
///< list of nodes to concat
size_t
length
;
///< number of cat'ed nodes
size_t
length
;
///< number of cat'ed nodes
size_t
current
;
///< index of currently read node
size_t
current
;
///< index of currently read node
uint64_t
total_size
;
};
};
static
av_cold
int
concat_close
(
URLContext
*
h
)
static
av_cold
int
concat_close
(
URLContext
*
h
)
...
@@ -59,7 +60,7 @@ static av_cold int concat_open(URLContext *h, const char *uri, int flags)
...
@@ -59,7 +60,7 @@ static av_cold int concat_open(URLContext *h, const char *uri, int flags)
{
{
char
*
node_uri
=
NULL
;
char
*
node_uri
=
NULL
;
int
err
=
0
;
int
err
=
0
;
int64_t
size
;
int64_t
size
,
total_size
=
0
;
size_t
len
,
i
;
size_t
len
,
i
;
URLContext
*
uc
;
URLContext
*
uc
;
struct
concat_data
*
data
=
h
->
priv_data
;
struct
concat_data
*
data
=
h
->
priv_data
;
...
@@ -112,6 +113,7 @@ static av_cold int concat_open(URLContext *h, const char *uri, int flags)
...
@@ -112,6 +113,7 @@ static av_cold int concat_open(URLContext *h, const char *uri, int flags)
/* assembling */
/* assembling */
nodes
[
i
].
uc
=
uc
;
nodes
[
i
].
uc
=
uc
;
nodes
[
i
].
size
=
size
;
nodes
[
i
].
size
=
size
;
total_size
+=
size
;
}
}
av_free
(
node_uri
);
av_free
(
node_uri
);
data
->
length
=
i
;
data
->
length
=
i
;
...
@@ -123,6 +125,7 @@ static av_cold int concat_open(URLContext *h, const char *uri, int flags)
...
@@ -123,6 +125,7 @@ static av_cold int concat_open(URLContext *h, const char *uri, int flags)
err
=
AVERROR
(
ENOMEM
);
err
=
AVERROR
(
ENOMEM
);
}
else
}
else
data
->
nodes
=
nodes
;
data
->
nodes
=
nodes
;
data
->
total_size
=
total_size
;
return
err
;
return
err
;
}
}
...
@@ -158,6 +161,8 @@ static int64_t concat_seek(URLContext *h, int64_t pos, int whence)
...
@@ -158,6 +161,8 @@ static int64_t concat_seek(URLContext *h, int64_t pos, int whence)
struct
concat_nodes
*
nodes
=
data
->
nodes
;
struct
concat_nodes
*
nodes
=
data
->
nodes
;
size_t
i
;
size_t
i
;
if
((
whence
&
AVSEEK_SIZE
))
return
data
->
total_size
;
switch
(
whence
)
{
switch
(
whence
)
{
case
SEEK_END
:
case
SEEK_END
:
for
(
i
=
data
->
length
-
1
;
i
&&
pos
<
-
nodes
[
i
].
size
;
i
--
)
for
(
i
=
data
->
length
-
1
;
i
&&
pos
<
-
nodes
[
i
].
size
;
i
--
)
...
...
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