Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

upnp: issue Stop before SetAVTransportURI to make sure it's stopped

Renderers should reject this call if not stopped according to
DLNA
  • Loading branch information...
commit c1fd6725c9f8454f6d356b1a3a59830cd14315ae 1 parent 9f1f356
@elupus authored
Showing with 10 additions and 0 deletions.
  1. +10 −0 xbmc/network/upnp/UPnPPlayer.cpp
View
10 xbmc/network/upnp/UPnPPlayer.cpp
@@ -197,6 +197,16 @@ bool CUPnPPlayer::OpenFile(const CFileItem& file, const CPlayerOptions& options)
NPT_Cardinal res_index;
NPT_CHECK_LABEL_SEVERE(m_control->FindBestResource(m_delegate->m_device, *obj, res_index), failed);
+
+ /* dlna specifies that a return code of 705 should be returned
+ * if TRANSPORT_STATE is not STOPPED or NO_MEDIA_PRESENT */
+ NPT_CHECK_LABEL_SEVERE(m_control->Stop(m_delegate->m_device
+ , m_delegate->m_instance
+ , m_delegate), failed);
+ if(!m_delegate->m_resevent.WaitMSec(10000)) goto failed;
+ NPT_CHECK_LABEL_SEVERE(m_delegate->m_resstatus, failed);
+
+
NPT_CHECK_LABEL_SEVERE(m_control->SetAVTransportURI(m_delegate->m_device
, m_delegate->m_instance
, obj->m_Resources[res_index].m_Uri
Please sign in to comment.
Something went wrong with that request. Please try again.