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
4f112a8e
Commit
4f112a8e
authored
Mar 12, 2013
by
Nicolas George
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavf/mux: add the flush_packets option.
Note: a lot of muxers already do the flushing explicitly.
parent
125acd21
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
0 deletions
+15
-0
ffmpeg-formats.texi
doc/ffmpeg-formats.texi
+5
-0
avformat.h
libavformat/avformat.h
+7
-0
mux.c
libavformat/mux.c
+2
-0
options_table.h
libavformat/options_table.h
+1
-0
No files found.
doc/ffmpeg-formats.texi
View file @
4f112a8e
...
...
@@ -151,6 +151,11 @@ been without shifting.
Also note that this affects only leading negative timestamps, and not
non-monotonic negative timestamps.
@item flush
_
packets @var
{
integer
}
(@emph
{
output
}
)
Flush the underlying I/O stream after each packet. Default 1 enables it, and
has the effect of reducing the latency; 0 disables it and may slightly
increase performance in some cases.
@end table
@c man end FORMAT OPTIONS
...
...
libavformat/avformat.h
View file @
4f112a8e
...
...
@@ -1213,6 +1213,13 @@ typedef struct AVFormatContext {
*/
int
seek2any
;
/**
* Flush the I/O context after each packet.
* - encoding: Set by user via AVOptions (NO direct access)
* - decoding: unused
*/
int
flush_packets
;
/*****************************************************************
* All fields below this line are not part of the public API. They
* may not be used outside of libavformat and can be changed and
...
...
libavformat/mux.c
View file @
4f112a8e
...
...
@@ -494,6 +494,8 @@ static inline int split_write_packet(AVFormatContext *s, AVPacket *pkt)
did_split
=
av_packet_split_side_data
(
pkt
);
ret
=
s
->
oformat
->
write_packet
(
s
,
pkt
);
if
(
s
->
flush_packets
&&
s
->
pb
&&
s
->
pb
->
error
>=
0
)
avio_flush
(
s
->
pb
);
if
(
did_split
)
av_packet_merge_side_data
(
pkt
);
return
ret
;
...
...
libavformat/options_table.h
View file @
4f112a8e
...
...
@@ -75,6 +75,7 @@ static const AVOption options[]={
{
"avoid_negative_ts"
,
"shift timestamps to make them positive. 1 enables, 0 disables, default of -1 enables when required by target format."
,
OFFSET
(
avoid_negative_ts
),
AV_OPT_TYPE_INT
,
{.
i64
=
-
1
},
-
1
,
1
,
E
},
{
"skip_initial_bytes"
,
"skip initial bytes"
,
OFFSET
(
skip_initial_bytes
),
AV_OPT_TYPE_INT
,
{.
i64
=
0
},
0
,
INT_MAX
-
1
,
D
},
{
"correct_ts_overflow"
,
"correct single timestamp overflows"
,
OFFSET
(
correct_ts_overflow
),
AV_OPT_TYPE_INT
,
{.
i64
=
1
},
0
,
1
,
D
},
{
"flush_packets"
,
"enable flushing of the I/O context after each packet"
,
OFFSET
(
flush_packets
),
AV_OPT_TYPE_INT
,
{.
i64
=
1
},
0
,
1
,
E
},
{
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