diff options
author | Jan Schmidt <thaytan@mad.scientist.com> | 2004-05-21 13:28:24 +0000 |
---|---|---|
committer | Jan Schmidt <thaytan@mad.scientist.com> | 2004-05-21 13:28:24 +0000 |
commit | 4d97abb272985aa812deb3f92f6213cb40be16d2 (patch) | |
tree | caa5e0082acbf8d7b12c15f33a4f74c57805e3b9 /gst/debug | |
parent | dcc87f1efd61991a71f1eb0b4c631168f7ee6c57 (diff) |
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.
Diffstat (limited to 'gst/debug')
-rw-r--r-- | gst/debug/progressreport.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/gst/debug/progressreport.c b/gst/debug/progressreport.c index ea969919..3f17b245 100644 --- a/gst/debug/progressreport.c +++ b/gst/debug/progressreport.c @@ -172,6 +172,12 @@ gst_progressreport_report (GstProgressReport * progressreport, 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 @@ gst_progressreport_report (GstProgressReport * progressreport, 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, |