[FFmpeg-devel] [PATCH] fix seek_timestamp flag
Umair Khan
omerjerk at gmail.com
Tue Feb 9 23:56:05 CET 2016
Signed-off-by: Umair Khan <omerjerk at gmail.com>
---
ffmpeg_opt.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/ffmpeg_opt.c b/ffmpeg_opt.c
index 669976b..011a10b 100644
--- a/ffmpeg_opt.c
+++ b/ffmpeg_opt.c
@@ -164,6 +164,7 @@ static void init_options(OptionsContext *o)
o->mux_max_delay = 0.7;
o->start_time = AV_NOPTS_VALUE;
o->start_time_eof = AV_NOPTS_VALUE;
+ o->seek_timestamp = AV_NOPTS_VALUE;
o->recording_time = INT64_MAX;
o->limit_filesize = UINT64_MAX;
o->chapters_input_file = INT_MAX;
@@ -984,8 +985,8 @@ static int open_input_file(OptionsContext *o, const char *filename)
}
timestamp = (o->start_time == AV_NOPTS_VALUE) ? 0 : o->start_time;
/* add the stream start time */
- if (!o->seek_timestamp && ic->start_time != AV_NOPTS_VALUE)
- timestamp += ic->start_time;
+ if (o->seek_timestamp != AV_NOPTS_VALUE)
+ timestamp += ic->seek_timestamp;
/* if seeking requested, we execute it */
if (o->start_time != AV_NOPTS_VALUE) {
--
2.5.0
More information about the ffmpeg-devel
mailing list