summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Kost <ensonic@users.sf.net>2010-11-03 10:47:04 +0200
committerStefan Kost <ensonic@users.sf.net>2010-11-03 10:47:04 +0200
commitc4c0434e1d631813d34b22a1c218267403778fe2 (patch)
tree66d0d37a9f31d55c3bd4e42d05c7b0fe2e976c22
parente4b55363b596415f94823c7fa3095f0e15c63b95 (diff)
info: handle video area expose also if we have no video
-rw-r--r--src/mi-info.vala5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mi-info.vala b/src/mi-info.vala
index 50160f1..f1e7d09 100644
--- a/src/mi-info.vala
+++ b/src/mi-info.vala
@@ -45,6 +45,7 @@ public class MediaInfo.Info : VBox
// gstreamer objects
private Discoverer dc;
private Pipeline pb;
+ private bool have_video = false;
public Info ()
{
@@ -206,6 +207,7 @@ public class MediaInfo.Info : VBox
video_streams.remove_page (-1);
}
l = info.get_video_streams ();
+ have_video = (l.length () > 0);
for (int i = 0; i < l.length (); i++) {
sinfo = l.nth_data (i);
@@ -361,7 +363,8 @@ public class MediaInfo.Info : VBox
private bool on_drawing_area_expose (Widget widget, Gdk.EventExpose event)
{
- if (pb.current_state < State.PAUSED) {
+ // redraw if not playing and if there is no video
+ if (pb.current_state < State.PAUSED || !have_video) {
Gdk.Window w = widget.get_window();
Gtk.Allocation a;
widget.get_allocation(out a);