From 5f689af851084739a83f3c747d23373c88cf7a68 Mon Sep 17 00:00:00 2001 From: Stefan Sauer Date: Thu, 28 Oct 2010 01:41:07 +0300 Subject: [PATCH] info: stop playback on unrealize Prevent "BadDrawable" errors. --- mediainfo/src/mi-info.vala | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/mediainfo/src/mi-info.vala b/mediainfo/src/mi-info.vala index 0979485f49..dc0070cbbb 100644 --- a/mediainfo/src/mi-info.vala +++ b/mediainfo/src/mi-info.vala @@ -61,6 +61,7 @@ public class MediaInfo.Info : VBox drawing_area = new DrawingArea (); drawing_area.set_size_request (300, 150); drawing_area.realize.connect (on_drawing_area_realize); + drawing_area.unrealize.connect (on_drawing_area_unrealize); pack_start (drawing_area, true, true, 0); table = new Table (7, 2, false); @@ -216,6 +217,11 @@ public class MediaInfo.Info : VBox widget.unset_flags(Gtk.WidgetFlags.DOUBLE_BUFFERED); } + private void on_drawing_area_unrealize (Widget widget) + { + pb.set_state (State.NULL); + } + private void on_element_sync_message (Gst.Bus bus, Message message) { Structure structure = message.get_structure ();