mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-19 16:21:17 +00:00
Move discont event back to where it was :)
Original commit message from CVS: Move discont event back to where it was :)
This commit is contained in:
parent
1d77cd3e78
commit
bebb579a91
1 changed files with 4 additions and 10 deletions
|
@ -54,7 +54,6 @@ struct _GstMad {
|
|||
guint64 total_samples; /* the number of samples since the sync point */
|
||||
|
||||
gboolean restart;
|
||||
gboolean need_discont;
|
||||
|
||||
/* info */
|
||||
struct mad_header header;
|
||||
|
@ -256,7 +255,6 @@ gst_mad_init (GstMad *mad)
|
|||
mad->vbr_average = 0;
|
||||
mad->vbr_rate = 0;
|
||||
mad->restart = FALSE;
|
||||
mad->need_discont = FALSE;
|
||||
|
||||
GST_FLAG_SET (mad, GST_ELEMENT_EVENT_AWARE);
|
||||
}
|
||||
|
@ -681,6 +679,7 @@ gst_mad_chain (GstPad *pad, GstBuffer *buffer)
|
|||
gint64 value = GST_EVENT_DISCONT_OFFSET (event, i).value;
|
||||
gint64 time;
|
||||
GstFormat format;
|
||||
GstEvent *discont;
|
||||
|
||||
/* see how long the input bytes take */
|
||||
format = GST_FORMAT_TIME;
|
||||
|
@ -692,9 +691,10 @@ gst_mad_chain (GstPad *pad, GstBuffer *buffer)
|
|||
}
|
||||
|
||||
mad->base_time = time;
|
||||
mad->need_discont = TRUE;
|
||||
|
||||
gst_event_free (event);
|
||||
discont = gst_event_new_discontinuous (FALSE, GST_FORMAT_TIME, time, NULL);
|
||||
gst_pad_push (mad->srcpad, GST_BUFFER (discont));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -822,13 +822,6 @@ gst_mad_chain (GstPad *pad, GstBuffer *buffer)
|
|||
}
|
||||
|
||||
if (GST_PAD_IS_CONNECTED (mad->srcpad)) {
|
||||
if (mad->need_discont) {
|
||||
GstEvent *discont;
|
||||
|
||||
discont = gst_event_new_discontinuous (FALSE, GST_FORMAT_TIME, GST_BUFFER_TIMESTAMP (outbuffer), NULL);
|
||||
gst_pad_push (mad->srcpad, GST_BUFFER (discont));
|
||||
mad->need_discont = FALSE;
|
||||
}
|
||||
gst_pad_push (mad->srcpad, outbuffer);
|
||||
}
|
||||
else {
|
||||
|
@ -840,6 +833,7 @@ gst_mad_chain (GstPad *pad, GstBuffer *buffer)
|
|||
mad->tempsize = 0;
|
||||
goto end;
|
||||
}
|
||||
|
||||
next:
|
||||
|
||||
/* figure out how many bytes mad consumed */
|
||||
|
|
Loading…
Reference in a new issue