Shut down the media stack when shutting down the constellation

This commit is contained in:
Anthony Ramine 2017-11-15 11:28:20 +01:00
parent 17e97b9320
commit 38fd9648ce
4 changed files with 19 additions and 2 deletions

View file

@ -108,6 +108,8 @@ use debugger;
use devtools_traits::{ChromeToDevtoolsControlMsg, DevtoolsControlMsg};
use euclid::{Size2D, TypedSize2D, ScaleFactor};
use event_loop::EventLoop;
#[cfg(all(any(target_os = "macos", target_os = "linux"), not(any(target_arch = "arm", target_arch = "aarch64"))))]
use gecko_media::GeckoMedia;
use gfx::font_cache_thread::FontCacheThread;
use gfx_traits::Epoch;
use ipc_channel::{Error as IpcError};
@ -1481,6 +1483,16 @@ impl<Message, LTF, STF> Constellation<Message, LTF, STF>
debug!("Asking compositor to complete shutdown.");
self.compositor_proxy.send(ToCompositorMsg::ShutdownComplete);
#[cfg(all(
any(target_os = "macos", target_os = "linux"),
not(any(target_arch = "arm", target_arch = "aarch64")),
))]
{
if let Err(()) = GeckoMedia::shutdown() {
warn!("Media stack shutdown failed.");
}
}
}
fn handle_pipeline_exited(&mut self, pipeline_id: PipelineId) {