diff options
author | Aman Gupta <aman@tmm1.net> | 2018-05-15 15:56:45 -0700 |
---|---|---|
committer | Aman Gupta <aman@tmm1.net> | 2018-05-17 11:33:01 -0700 |
commit | 2734f8d63a3864d09f9e1359a8f5af4f13c70ac9 (patch) | |
tree | 8124fcf9a001a5e9c774edd1925f25c679cb8138 /libavformat/options_table.h | |
parent | 380ca1bc0ce886f043d1380b7aff99356220309b (diff) | |
download | ffmpeg-2734f8d63a3864d09f9e1359a8f5af4f13c70ac9.tar.gz |
avformat: add skip_estimate_duration_from_pts
For seekable mpegts streams, duration is calculated from
pts by seeking to the end of the file for a pts and subtracting
the initial pts to compute a duration.
This can be expensive in terms of added latency during
probe, especially when streaming over a network. This new
option lets you skip the duration calculation, which is useful
when you don't care about the value and want to save some overhead.
This patch is particularly useful when dealing with live mpegts
streams. Normally such streams are not seekable, so durations
are not calculated. However in my case I am dealing with a seekable
live mpegts stream (networked access to a .ts file which is still
being appended to).
Signed-off-by: Aman Gupta <aman@tmm1.net>
Diffstat (limited to 'libavformat/options_table.h')
-rw-r--r-- | libavformat/options_table.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libavformat/options_table.h b/libavformat/options_table.h index 7c4d84798e..b7a5b3c054 100644 --- a/libavformat/options_table.h +++ b/libavformat/options_table.h @@ -108,6 +108,7 @@ static const AVOption avformat_options[] = { {"protocol_whitelist", "List of protocols that are allowed to be used", OFFSET(protocol_whitelist), AV_OPT_TYPE_STRING, { .str = NULL }, CHAR_MIN, CHAR_MAX, D }, {"protocol_blacklist", "List of protocols that are not allowed to be used", OFFSET(protocol_blacklist), AV_OPT_TYPE_STRING, { .str = NULL }, CHAR_MIN, CHAR_MAX, D }, {"max_streams", "maximum number of streams", OFFSET(max_streams), AV_OPT_TYPE_INT, { .i64 = 1000 }, 0, INT_MAX, D }, +{"skip_estimate_duration_from_pts", "skip duration calculation in estimate_timings_from_pts", OFFSET(skip_estimate_duration_from_pts), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, D}, {NULL}, }; |