+2005-06-30 Edward Hervey <edward@fluendo.com>
+
+ * gst/avi/Makefile.am: (libgstavi_la_LIBADD):
+ Added linking to libgstriff-0.9
+
+ * ext/mad/gstmad.c: (gst_mad_src_query):
+ check the format of the upstream query and return query if it's the
+ same format as the requested one.
+
2005-06-30 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
* gst/avi/gstavidemux.c: (gst_avi_demux_handle_src_query):
case GST_QUERY_POSITION:
{
GstFormat format;
+ GstFormat rformat;
gint64 cur, total, total_bytes;
/* save requested format */
GST_LOG_OBJECT (mad, "query on peer pad failed");
goto error;
}
-
- gst_query_parse_position (query, NULL, NULL, &total_bytes);
- GST_LOG_OBJECT (mad, "peer pad returned total=%lld bytes", total_bytes);
+ /* get the returned format */
+ gst_query_parse_position (query, &rformat, NULL, &total_bytes);
+ if (rformat == GST_FORMAT_BYTES)
+ GST_LOG_OBJECT (mad, "peer pad returned total=%lld bytes", total_bytes);
+ else if (rformat == GST_FORMAT_TIME)
+ GST_LOG_OBJECT (mad, "peer pad returned time=%lld", total_bytes);
+
+ /* Check if requested format is returned format */
+ if (format == rformat)
+ return TRUE;
/* and convert to the requested format */
if (format != GST_FORMAT_DEFAULT) {