diff options
author | Mark Nauwelaerts <mnauw@users.sourceforge.net> | 2013-11-02 15:38:13 +0100 |
---|---|---|
committer | Mark Nauwelaerts <mnauw@users.sourceforge.net> | 2013-11-02 16:13:27 +0100 |
commit | 8da78d15958f07020586db390ea1a98233f9b0d2 (patch) | |
tree | 498be65c3ba0e906e666065be90af8f666418815 /libs | |
parent | 3aaa3fcf92ec95e7ade4bcce057ea08bfc4d6a83 (diff) |
baseparse: try first frame pts and dts for a valid start timestamp
Diffstat (limited to 'libs')
-rw-r--r-- | libs/gst/base/gstbaseparse.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libs/gst/base/gstbaseparse.c b/libs/gst/base/gstbaseparse.c index b1fe677b3..19034f8d2 100644 --- a/libs/gst/base/gstbaseparse.c +++ b/libs/gst/base/gstbaseparse.c @@ -3885,6 +3885,9 @@ gst_base_parse_locate_time (GstBaseParse * parse, GstClockTime * _time, /* need initial positions; start and end */ lpos = parse->priv->first_frame_offset; ltime = parse->priv->first_frame_pts; + /* try other one if no luck */ + if (!GST_CLOCK_TIME_IS_VALID (ltime)) + ltime = parse->priv->first_frame_dts; if (!gst_base_parse_get_duration (parse, GST_FORMAT_TIME, &htime)) { GST_DEBUG_OBJECT (parse, "Unknown time duration, cannot bisect"); return GST_FLOW_ERROR; |