[mythtv-commits] Re: Ticket #861: Attempted call to
videoOutput->DiscardFrames() triggered by NVP::OpenFile() which is before
videoOutput is initialized
MythTV
mythtv at cvs.mythtv.org
Fri Dec 23 13:55:26 EST 2005
#861: Attempted call to videoOutput->DiscardFrames() triggered by NVP::OpenFile()
which is before videoOutput is initialized
----------------------------------------+-----------------------------------
Reporter: jwestfall at surrealistic.net | Owner: ijr
Type: defect | Status: new
Priority: minor | Milestone: unknown
Component: mythtv | Version: head
Severity: low | Resolution:
----------------------------------------+-----------------------------------
Changes (by cpinkham):
* summary: mythcommflag crash. => Attempted call to
videoOutput->DiscardFrames() triggered by
NVP::OpenFile() which is before videoOutput is
initialized
Comment:
This patch was invalid anyway, you can't call ClassicCommDetector::Init()
before you call nvp->OpenFile() since ClassicCommDetector::Init() calls
nvp->GetVideoWidth(), nvp->GetVideoHeight(), and nvp->GetFrameRate(), all
of which depend on the file being opened already in order to know that
information.
If NVP::OpenFile() can trigger a call to NVP::DiscardVideoFrames()
somehow, then that needs to be fixed somehow. Even NVP::StartPlaying()
calls NVP::OpenFile() before calling NVP::InitVideo(). NVP::InitVideo()
must be called after NVP::Openfile() since InitVideo needs to know the
video's height and width. So, we need to prevent calls to videoOutput
before we've initialized video. You should be able to wrap the call to
videoOutput->DiscardFrames() with a "if (videoOutput)" to fix the issue
you're seeing.
Can you try reversing your patch and patching NVP as I indicated and
seeing if that fixes your issue? Calling NVP::InitVideo() first is not an
option so we need to prevent attempted calls accessing videoOutput until
it is initialized. From the looks of it, I don't see how this doesn't
fail when trying to play the video also since the normal player opens the
file first then initializes video later.
--
Ticket URL: <http://cvs.mythtv.org/trac/ticket/861>
MythTV <http://www.mythtv.org/>
MythTV
More information about the mythtv-commits
mailing list