{"action":"created","issue":{"url":"https://api.github.com/repos/xbmc/xbmc/issues/6236","labels_url":"https://api.github.com/repos/xbmc/xbmc/issues/6236/labels{/name}","comments_url":"https://api.github.com/repos/xbmc/xbmc/issues/6236/comments","events_url":"https://api.github.com/repos/xbmc/xbmc/issues/6236/events","html_url":"https://github.com/xbmc/xbmc/pull/6236","id":54930753,"number":6236,"title":"[cec] Don't resume on source change if playback is paused.","user":{"login":"anaconda","id":497012,"avatar_url":"https://avatars.githubusercontent.com/u/497012?v=3","gravatar_id":"","url":"https://api.github.com/users/anaconda","html_url":"https://github.com/anaconda","followers_url":"https://api.github.com/users/anaconda/followers","following_url":"https://api.github.com/users/anaconda/following{/other_user}","gists_url":"https://api.github.com/users/anaconda/gists{/gist_id}","starred_url":"https://api.github.com/users/anaconda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anaconda/subscriptions","organizations_url":"https://api.github.com/users/anaconda/orgs","repos_url":"https://api.github.com/users/anaconda/repos","events_url":"https://api.github.com/users/anaconda/events{/privacy}","received_events_url":"https://api.github.com/users/anaconda/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-01-20T19:54:42Z","updated_at":"2015-01-20T21:26:13Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/xbmc/xbmc/pulls/6236","html_url":"https://github.com/xbmc/xbmc/pull/6236","diff_url":"https://github.com/xbmc/xbmc/pull/6236.diff","patch_url":"https://github.com/xbmc/xbmc/pull/6236.patch"},"body":"Fixes \"Pause playback when switching to another source\" behavior when playback is already paused.\r\nAlthough it's been reported in the wrong place, this fixes https://github.com/Pulse-Eight/libcec/issues/51\r\nI would suggest this be backported, although it's not critical at all.\r\n\r\n--\r\nOriginal comment from @mk01:\r\n\r\nFunction CecSourceActivated is supposed to pause playback if another device is\r\nactivated on CEC bus. this action is triggered later in the code via app\r\nmessenger call MediaPause(). MediaPause() before unpausing video is\r\nwakingupfrom screensaver too. this sends 'OnScreensaverDeactivated' msg what\r\nreturning back to CecAdapter calls (based on wakeonscreensaver)\r\nActivateSource().\r\n\r\nBy use of player->IsPlaying check (what doesn't consider already paused\r\nplayback) whole process can actually make switching to another source\r\nimpossible - as if playback is already paused and XBMC gets deactivated,\r\nplayer->Pause() is still called, event screensaverdeactivated generated and\r\nXBMC finally activates itself again."},"comment":{"url":"https://api.github.com/repos/xbmc/xbmc/issues/comments/70736874","html_url":"https://github.com/xbmc/xbmc/pull/6236#issuecomment-70736874","issue_url":"https://api.github.com/repos/xbmc/xbmc/issues/6236","id":70736874,"user":{"login":"opdenkamp","id":441806,"avatar_url":"https://avatars.githubusercontent.com/u/441806?v=3","gravatar_id":"","url":"https://api.github.com/users/opdenkamp","html_url":"https://github.com/opdenkamp","followers_url":"https://api.github.com/users/opdenkamp/followers","following_url":"https://api.github.com/users/opdenkamp/following{/other_user}","gists_url":"https://api.github.com/users/opdenkamp/gists{/gist_id}","starred_url":"https://api.github.com/users/opdenkamp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opdenkamp/subscriptions","organizations_url":"https://api.github.com/users/opdenkamp/orgs","repos_url":"https://api.github.com/users/opdenkamp/repos","events_url":"https://api.github.com/users/opdenkamp/events{/privacy}","received_events_url":"https://api.github.com/users/opdenkamp/received_events","type":"User","site_admin":false},"created_at":"2015-01-20T21:26:13Z","updated_at":"2015-01-20T21:26:13Z","body":"jenkins build and merge"}}