diff --git a/ChangeLog b/ChangeLog index ba8041c87f..698265f4e7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2005-06-30 Edward Hervey + + * 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 * gst/avi/gstavidemux.c: (gst_avi_demux_handle_src_query): diff --git a/ext/mad/gstmad.c b/ext/mad/gstmad.c index b385e8973a..0a1ecc9be5 100644 --- a/ext/mad/gstmad.c +++ b/ext/mad/gstmad.c @@ -552,6 +552,7 @@ gst_mad_src_query (GstPad * pad, GstQuery * query) case GST_QUERY_POSITION: { GstFormat format; + GstFormat rformat; gint64 cur, total, total_bytes; /* save requested format */ @@ -563,9 +564,16 @@ gst_mad_src_query (GstPad * pad, GstQuery * query) GST_LOG_OBJECT (mad, "query on peer pad failed"); goto error; } + /* 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); - gst_query_parse_position (query, NULL, NULL, &total_bytes); - GST_LOG_OBJECT (mad, "peer pad returned total=%lld bytes", 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) {