mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-22 00:06:36 +00:00
giobasesink: we mustn't change the format of a query response
Not even in the DEFAULT case. That's bad 0.10 behaviour, no caller is ever going to check the format of the response.
This commit is contained in:
parent
184fe464da
commit
6eb38f9b3e
1 changed files with 2 additions and 2 deletions
|
@ -325,7 +325,7 @@ gst_gio_base_sink_query (GstBaseSink * bsink, GstQuery * query)
|
||||||
switch (format) {
|
switch (format) {
|
||||||
case GST_FORMAT_BYTES:
|
case GST_FORMAT_BYTES:
|
||||||
case GST_FORMAT_DEFAULT:
|
case GST_FORMAT_DEFAULT:
|
||||||
gst_query_set_position (query, GST_FORMAT_BYTES, sink->position);
|
gst_query_set_position (query, format, sink->position);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
default:
|
default:
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -346,7 +346,7 @@ gst_gio_base_sink_query (GstBaseSink * bsink, GstQuery * query)
|
||||||
case GST_QUERY_SEEKING:
|
case GST_QUERY_SEEKING:
|
||||||
gst_query_parse_seeking (query, &format, NULL, NULL, NULL);
|
gst_query_parse_seeking (query, &format, NULL, NULL, NULL);
|
||||||
if (format == GST_FORMAT_BYTES || format == GST_FORMAT_DEFAULT) {
|
if (format == GST_FORMAT_BYTES || format == GST_FORMAT_DEFAULT) {
|
||||||
gst_query_set_seeking (query, GST_FORMAT_BYTES,
|
gst_query_set_seeking (query, format,
|
||||||
GST_GIO_STREAM_IS_SEEKABLE (sink->stream), 0, -1);
|
GST_GIO_STREAM_IS_SEEKABLE (sink->stream), 0, -1);
|
||||||
} else {
|
} else {
|
||||||
gst_query_set_seeking (query, format, FALSE, 0, -1);
|
gst_query_set_seeking (query, format, FALSE, 0, -1);
|
||||||
|
|
Loading…
Reference in a new issue