Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 18 additions & 3 deletions gst/interpipe/gstinterpipesrc.c
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,11 @@ gst_inter_pipe_src_finalize (GObject * object)

src = GST_INTER_PIPE_SRC (object);

if (src->listen_to) {
g_free (src->listen_to);
src->listen_to = NULL;
}

/* Free pending serial events queue */
g_queue_free_full (src->pending_serial_events,
(GDestroyNotify) gst_event_unref);
Expand Down Expand Up @@ -679,9 +684,19 @@ gst_inter_pipe_src_push_buffer (GstInterPipeIListener * iface,
"Calculated Buffer Timestamp (PTS): %" GST_TIME_FORMAT,
GST_TIME_ARGS (GST_BUFFER_PTS (buffer)));
} else if (GST_INTER_PIPE_SRC_RESTART_TIMESTAMP == src->stream_sync) {
/* Remove the incoming timestamp to be generated according this basetime */
GST_BUFFER_PTS (buffer) = GST_CLOCK_TIME_NONE;
GST_BUFFER_DTS (buffer) = GST_CLOCK_TIME_NONE;
if (GST_STATE (src) == GST_STATE_PLAYING) {
/* Remove the incoming timestamp to be generated according this basetime */
GST_BUFFER_PTS (buffer) = GST_CLOCK_TIME_NONE;
GST_BUFFER_DTS (buffer) = GST_CLOCK_TIME_NONE;
} else {
/*
* appsrc requires srcbasetime to re-timestamp buffers, and srcbasetime
* is only valid when PLAYING.
*/
GST_LOG_OBJECT (src, "Not PLAYING state yet");
gst_buffer_unref (buffer);
goto nosync;
}
}

ret = gst_app_src_push_buffer (appsrc, buffer);
Expand Down