break;
}
+ /* Refuse BYTES format queries. If it made sense to
+ * answer them, upstream would have already */
+ if (format == GST_FORMAT_BYTES) {
+ GST_LOG_OBJECT (dec, "Ignoring BYTES position query");
+ break;
+ }
+
/* we start from the last seen time */
time = dec->output_segment.position;
/* correct for the segment values */
ret = gst_pad_push (enc->srcpad, tmpbuf);
if (ret != GST_FLOW_OK) {
GST_WARNING_OBJECT (enc, "pushing header returned %s",
- gst_flow_get_name (ret));
+ gst_flow_get_name (ret));
goto exit;
}
}
}
gst_query_parse_position (query, &req_fmt, NULL);
+
+ /* Refuse BYTES format queries. If it made sense to
+ * * answer them, upstream would have already */
+ if (req_fmt == GST_FORMAT_BYTES) {
+ GST_LOG_OBJECT (enc, "Ignoring BYTES position query");
+ break;
+ }
+
fmt = GST_FORMAT_TIME;
if (!(res = gst_pad_peer_query_position (enc->sinkpad, fmt, &pos)))
break;
}
gst_query_parse_duration (query, &req_fmt, NULL);
+
+ /* Refuse BYTES format queries. If it made sense to
+ * * answer them, upstream would have already */
+ if (req_fmt == GST_FORMAT_BYTES) {
+ GST_LOG_OBJECT (enc, "Ignoring BYTES position query");
+ break;
+ }
+
fmt = GST_FORMAT_TIME;
if (!(res = gst_pad_peer_query_duration (enc->sinkpad, fmt, &dur)))
break;