Opened 11 years ago
Closed 11 years ago
#11141 closed Patch - Bug Fix (fixed)
Experimental commerciall flagging options D2 goes into finite loop on frame 0 taking 100% CPU
Reported by: | Owned by: | Jim Stichnoth | |
---|---|---|---|
Priority: | minor | Milestone: | 0.27 |
Component: | MythTV - Mythcommflag | Version: | Master Head |
Severity: | medium | Keywords: | |
Cc: | Ticket locked: | no |
Description
The current code just keeps requesting frame 0.
Attachments (2)
Change History (9)
comment:1 Changed 11 years ago by
comment:2 Changed 11 years ago by
Owner: | changed from cpinkham to Jim Stichnoth |
---|---|
Status: | new → assigned |
comment:3 Changed 11 years ago by
Milestone: | unknown → 0.26.1 |
---|---|
Status: | assigned → accepted |
Version: | Unspecified → Master Head |
Changed 11 years ago by
Attachment: | D2_v2.patch added |
---|
comment:4 Changed 11 years ago by
D2.patch does not handle the case where Logo detection wants to skip over 100 frames at a time.
The original code assumes that GetRawVideoFrame?() will return a frame >= to the frame number requested - this is no longer true.
D2_v2.patch fixes this and is significantly faster - previously it was seeking to every frame, even when sequential - now it only seeks when it needs to jump to a specified frame.
While this patch will allow the code to work, I will note, as other developers have commented, that the detection code is both slow, and no better than the Classic Commercial detector code - my experience confirms those anecdotal comments.
comment:5 Changed 11 years ago by
Milestone: | 0.26.1 → 0.27 |
---|
There is a patch so hopefully someone will look this for 0.27?
comment:6 Changed 11 years ago by
The issue appears to be an off-by-one mismatch in frame numbering, in the case of seeking to a specific frame number versus querying the number of the most recently rendered frame. In the original code, this results in continually asking to seek to the same frame. I suspect that the 'Remove the "Seek to exact frame" setting' commit made the logic more rigorous and exposed a preexisting issue in the experimental commflagging code.
Apart from that, it's a nice find that we can greatly speed up next-frame seeking by avoiding actual seeking.
comment:7 Changed 11 years ago by
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
I think this bug was introduced as an unintended side effect of this commit Remove the "Seek to exact frame" setting.: https://github.com/MythTV/mythtv/commit/4d0bbbe1e54aaa91abbd233b7e5a1a48103462f2
and specifically this change in mythPlayer.cpp