mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-18 15:51:11 +00:00
ext/alsa/gstalsasink.c: allow discont events before caps nego
Original commit message from CVS: * ext/alsa/gstalsasink.c: (gst_alsa_sink_check_event): allow discont events before caps nego
This commit is contained in:
parent
98e395d53e
commit
12ca207b30
2 changed files with 11 additions and 8 deletions
|
@ -1,3 +1,8 @@
|
|||
2004-05-09 Benjamin Otte <otte@gnome.org>
|
||||
|
||||
* ext/alsa/gstalsasink.c: (gst_alsa_sink_check_event):
|
||||
allow discont events before caps nego
|
||||
|
||||
2004-05-08 Benjamin Otte <otte@gnome.org>
|
||||
|
||||
* ext/vorbis/vorbisdec.c: (vorbis_dec_event):
|
||||
|
|
|
@ -212,22 +212,20 @@ gst_alsa_sink_check_event (GstAlsaSink * sink, gint pad_nr)
|
|||
{
|
||||
GstClockTime value;
|
||||
|
||||
/* only the first pad my seek */
|
||||
/* only the first pad may seek */
|
||||
if (pad_nr != 0) {
|
||||
break;
|
||||
}
|
||||
if (gst_event_discont_get_value (event, GST_FORMAT_TIME, &value)) {
|
||||
gst_element_set_time (GST_ELEMENT (this), value);
|
||||
} else if (gst_event_discont_get_value (event, GST_FORMAT_DEFAULT,
|
||||
&value)) {
|
||||
} else if (this->format &&
|
||||
(gst_event_discont_get_value (event, GST_FORMAT_DEFAULT, &value) ||
|
||||
gst_event_discont_get_value (event, GST_FORMAT_BYTES,
|
||||
&value))) {
|
||||
value = gst_alsa_samples_to_timestamp (this, value);
|
||||
gst_element_set_time (GST_ELEMENT (this), value);
|
||||
} else if (gst_event_discont_get_value (event, GST_FORMAT_BYTES,
|
||||
&value)) {
|
||||
value = gst_alsa_bytes_to_timestamp (this, value);
|
||||
gst_element_set_time (GST_ELEMENT (this), value);
|
||||
} else {
|
||||
GST_ERROR_OBJECT (this,
|
||||
GST_WARNING_OBJECT (this,
|
||||
"couldn't extract time from discont event. Bad things might happen!");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue