mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-18 13:25:56 +00:00
fix flacdec when src not connected
Original commit message from CVS: fix flacdec when src not connected
This commit is contained in:
parent
055ee4d5cc
commit
7519af569b
1 changed files with 15 additions and 17 deletions
|
@ -428,29 +428,28 @@ gst_flacdec_write (const FLAC__SeekableStreamDecoder *decoder,
|
|||
GstEvent *discont;
|
||||
|
||||
flacdec->need_discont = FALSE;
|
||||
|
||||
|
||||
|
||||
if (!GST_PAD_CAPS (flacdec->srcpad)) {
|
||||
if (flacdec->seek_pending) {
|
||||
flacdec->total_samples = flacdec->seek_value;
|
||||
}
|
||||
if (flacdec->seek_pending) {
|
||||
flacdec->total_samples = flacdec->seek_value;
|
||||
}
|
||||
|
||||
if (GST_PAD_IS_USABLE (flacdec->srcpad)) {
|
||||
GST_DEBUG (0, "send discont");
|
||||
if (GST_PAD_IS_USABLE (flacdec->srcpad)) {
|
||||
GST_DEBUG (0, "send discont");
|
||||
|
||||
format = GST_FORMAT_TIME;
|
||||
gst_pad_convert (flacdec->srcpad, GST_FORMAT_DEFAULT,
|
||||
flacdec->total_samples, &format, &time);
|
||||
format = GST_FORMAT_BYTES;
|
||||
gst_pad_convert (flacdec->srcpad, GST_FORMAT_DEFAULT,
|
||||
flacdec->total_samples, &format, &bytes);
|
||||
discont = gst_event_new_discontinuous (FALSE, GST_FORMAT_TIME, time,
|
||||
GST_FORMAT_BYTES, bytes,
|
||||
format = GST_FORMAT_TIME;
|
||||
gst_pad_convert (flacdec->srcpad, GST_FORMAT_DEFAULT,
|
||||
flacdec->total_samples, &format, &time);
|
||||
format = GST_FORMAT_BYTES;
|
||||
gst_pad_convert (flacdec->srcpad, GST_FORMAT_DEFAULT,
|
||||
flacdec->total_samples, &format, &bytes);
|
||||
discont = gst_event_new_discontinuous (FALSE, GST_FORMAT_TIME, time,
|
||||
GST_FORMAT_BYTES, bytes,
|
||||
GST_FORMAT_DEFAULT, flacdec->total_samples,
|
||||
NULL);
|
||||
|
||||
gst_pad_push (flacdec->srcpad, GST_BUFFER (discont));
|
||||
gst_pad_push (flacdec->srcpad, GST_BUFFER (discont));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -771,4 +770,3 @@ gst_flacdec_get_property (GObject *object, guint prop_id,
|
|||
g_warning ("Unknown property id\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue