ext/dv/gstdvdec.c: Fix format conversion and position querying.
Original commit message from CVS:
* ext/dv/gstdvdec.c: (gst_dvdec_init), (gst_dvdec_get_formats),
(gst_dvdec_src_convert), (gst_dvdec_sink_convert):
Fix format conversion and position querying.
* gst/debug/progressreport.c: (gst_progressreport_report):
Don't output a bogus total value that we didn't query.
* sys/xvimage/xvimagesink.c: (gst_xvimagesink_get_xv_support):
Always set XV_AUTOPAINT_COLORKEY to true. Fixes xvimagesink showing
only a blank window after xine has been used.
diff --git a/gst/debug/progressreport.c b/gst/debug/progressreport.c
index ea96991..3f17b24 100644
--- a/gst/debug/progressreport.c
+++ b/gst/debug/progressreport.c
@@ -172,6 +172,12 @@
GST_QUERY_POSITION, &peer_format, &cur_progress)) {
GstFormat peer_format2 = peer_format;
gchar *format_name = NULL;
+ gboolean got_total = FALSE;
+
+ if ((gst_pad_query (gst_pad_get_peer (progressreport->sinkpad),
+ GST_QUERY_TOTAL, &peer_format2, &total_progress)) &&
+ (peer_format == peer_format2))
+ got_total = TRUE;
switch (peer_format) {
case GST_FORMAT_BYTES:
@@ -193,9 +199,7 @@
break;
}
- if ((gst_pad_query (gst_pad_get_peer (progressreport->sinkpad),
- GST_QUERY_TOTAL, &peer_format2, &total_progress)) &&
- (peer_format == peer_format2)) {
+ if (got_total == TRUE) {
g_print ("%s (%2d:%2d:%2d): %lld / %lld %s (%3.2g %%)\n",
gst_object_get_name (GST_OBJECT (progressreport)), hh, mm, ss,
cur_progress, total_progress, format_name,