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
67cc31d6
Commit
67cc31d6
authored
Apr 19, 2013
by
Clément Bœsch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavf/gif: add final_delay option.
parent
a16c2056
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
gif.c
libavformat/gif.c
+5
-0
No files found.
libavformat/gif.c
View file @
67cc31d6
...
...
@@ -68,6 +68,7 @@ static int gif_image_write_header(AVIOContext *pb, int width, int height,
typedef
struct
{
AVClass
*
class
;
/** Class for private options. */
int
loop
;
int
last_delay
;
AVPacket
*
prev_pkt
;
int
duration
;
}
GIFContext
;
...
...
@@ -139,6 +140,8 @@ static int flush_packet(AVFormatContext *s, AVPacket *new)
if
(
new
&&
new
->
pts
!=
AV_NOPTS_VALUE
)
gif
->
duration
=
av_clip_uint16
(
new
->
pts
-
gif
->
prev_pkt
->
pts
);
else
if
(
!
new
&&
gif
->
last_delay
>=
0
)
gif
->
duration
=
gif
->
last_delay
;
/* graphic control extension block */
avio_w8
(
pb
,
0x21
);
...
...
@@ -188,6 +191,8 @@ static int gif_write_trailer(AVFormatContext *s)
static
const
AVOption
options
[]
=
{
{
"loop"
,
"Number of times to loop the output."
,
OFFSET
(
loop
),
AV_OPT_TYPE_INT
,
{
.
i64
=
0
},
0
,
65535
,
ENC
},
{
"final_delay"
,
"Force delay (in ms) after the last frame"
,
OFFSET
(
last_delay
),
AV_OPT_TYPE_INT
,
{
.
i64
=
-
1
},
-
1
,
65535
,
ENC
},
{
NULL
},
};
...
...
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