mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-22 16:26:39 +00:00
basesink: Query upstream for the position if conversion in PAUSED failed
Fixes bug #590045.
This commit is contained in:
parent
6bc2bf8307
commit
6033efb920
1 changed files with 9 additions and 3 deletions
|
@ -4231,7 +4231,7 @@ gst_base_sink_get_position_last (GstBaseSink * basesink, GstFormat format,
|
||||||
* value will be -1. With LOCK. */
|
* value will be -1. With LOCK. */
|
||||||
static gboolean
|
static gboolean
|
||||||
gst_base_sink_get_position_paused (GstBaseSink * basesink, GstFormat format,
|
gst_base_sink_get_position_paused (GstBaseSink * basesink, GstFormat format,
|
||||||
gint64 * cur)
|
gint64 * cur, gboolean * convert_failed)
|
||||||
{
|
{
|
||||||
gboolean res;
|
gboolean res;
|
||||||
gint64 time;
|
gint64 time;
|
||||||
|
@ -4285,8 +4285,10 @@ gst_base_sink_get_position_paused (GstBaseSink * basesink, GstFormat format,
|
||||||
GST_OBJECT_UNLOCK (basesink);
|
GST_OBJECT_UNLOCK (basesink);
|
||||||
res =
|
res =
|
||||||
gst_pad_query_convert (basesink->sinkpad, oformat, *cur, &format, cur);
|
gst_pad_query_convert (basesink->sinkpad, oformat, *cur, &format, cur);
|
||||||
if (!res)
|
if (!res) {
|
||||||
*cur = -1;
|
*cur = -1;
|
||||||
|
*convert_failed = TRUE;
|
||||||
|
}
|
||||||
GST_OBJECT_LOCK (basesink);
|
GST_OBJECT_LOCK (basesink);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4425,9 +4427,13 @@ in_eos:
|
||||||
}
|
}
|
||||||
in_pause:
|
in_pause:
|
||||||
{
|
{
|
||||||
|
gboolean format_conversion_failed = FALSE;
|
||||||
GST_DEBUG_OBJECT (basesink, "position in PAUSED");
|
GST_DEBUG_OBJECT (basesink, "position in PAUSED");
|
||||||
res = gst_base_sink_get_position_paused (basesink, format, cur);
|
res = gst_base_sink_get_position_paused (basesink, format, cur,
|
||||||
|
&format_conversion_failed);
|
||||||
GST_OBJECT_UNLOCK (basesink);
|
GST_OBJECT_UNLOCK (basesink);
|
||||||
|
if (format_conversion_failed)
|
||||||
|
goto convert_failed;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
wrong_state:
|
wrong_state:
|
||||||
|
|
Loading…
Reference in a new issue