if (handle->param->seeking) {
/* Shifting the decoded out buffer time as the start time */
- GST_BUFFER_PTS (GST_PAD_PROBE_INFO_BUFFER(info)) -= start_pos_ts;
+ if (GST_BUFFER_PTS (GST_PAD_PROBE_INFO_BUFFER(info)) >= start_pos_ts) {
+ GST_BUFFER_PTS (GST_PAD_PROBE_INFO_BUFFER(info)) -= start_pos_ts;
+ } else {
+ /* If input buffer time is less than start position,
+ * input buffer will be dropped.
+ */
+ return GST_PAD_PROBE_DROP;
+ }
+
}
}
return GST_PAD_PROBE_OK;
if(handle->param->seeking) {
/* Shifting the decoded out buffer time as the start time */
- GST_BUFFER_PTS (GST_PAD_PROBE_INFO_BUFFER(info)) -= start_pos_ts;
+ if (GST_BUFFER_PTS (GST_PAD_PROBE_INFO_BUFFER(info)) >= start_pos_ts) {
+ GST_BUFFER_PTS (GST_PAD_PROBE_INFO_BUFFER(info)) -= start_pos_ts;
+ } else {
+ /* If input buffer time is less than start position,
+ * input buffer will be dropped.
+ */
+ return GST_PAD_PROBE_DROP;
+ }
+
}
}
return GST_PAD_PROBE_OK;