Comment 22 for bug 210303

Revision history for this message
Andreas Scherf (scherfa) wrote :

Here is the problem code :
it is located in xinewidget ... and xine reports an unhandled stream ...
and this function is called in the play function of kaffeine ... so while playing a video
it endlessly try's to install a codec .. maybee we shoud store a already installed value
in the kaffeine settings so that unhandledStreamsPresent() doesnt return False if the codecs are already installed ....

Could anyone send me the patched sources of kaffeine because i did not know how to patch the original sources ...

bool KXineWidget::unhandledStreamsPresent()
{
unsigned int hasAudio = xine_get_stream_info(m_xineStream, XINE_STREAM_INFO_HAS_AUDIO);
unsigned int hasVideo = xine_get_stream_info(m_xineStream, XINE_STREAM_INFO_HAS_VIDEO);

 return (hasAudio && !xine_get_stream_info(m_xineStream, XINE_STREAM_INFO_AUDIO_HANDLED)) ||
  (hasVideo && !xine_get_stream_info(m_xineStream, XINE_STREAM_INFO_VIDEO_HANDLED));
}

void KXineWidget::slotPlay()
{
 if ((!isXineReady()) || (isQueueEmpty()))
   return;
  }

if (unhandledStreamsPresent())
{
  errorOut("No codecs to handle media");
  sendXineError();
  return;
}
}