Opened 15 years ago
Closed 15 years ago
#861 closed defect (fixed)
Attempted call to videoOutput->DiscardFrames() triggered by NVP::OpenFile() which is before videoOutput is initialized
Reported by: | Owned by: | Isaac Richards | |
---|---|---|---|
Priority: | minor | Milestone: | unknown |
Component: | mythtv | Version: | head |
Severity: | low | Keywords: | |
Cc: | Ticket locked: | no |
Description
Got a different crash, will attach a bt.
looking at the bt/code the issue is in ClassicCommDetector::go(). Its calling nvp->OpenFile?() before nvp->InitVideo?() and there exists a code path where NuppelVideoPlayer::OpenFile?() calls NuppelVideoPlayer::DiscardVideoFrames? which uses the NULL videoOutput.
Attachments (3)
Change History (7)
Changed 15 years ago by
Attachment: | commcrash.txt added |
---|
Changed 15 years ago by
Attachment: | commflag.diff added |
---|
simple patch that moves OpenFile?() after InitVideo?()
comment:2 Changed 15 years ago by
Summary: | mythcommflag crash. → Attempted call to videoOutput->DiscardFrames() triggered by NVP::OpenFile() which is before videoOutput is initialized |
---|
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.
bt