Modify

Ticket #11141 (accepted Patch - Bug Fix)

Opened 8 months ago

Last modified 8 months ago

Experimental commerciall flagging options D2 goes into finite loop on frame 0 taking 100% CPU

Reported by: Wayne McDougall <waynemcdougall@…> Owned by: stichnot
Priority: minor Milestone: 0.26.1
Component: MythTV - Mythcommflag Version: Master Head
Severity: medium Keywords:
Cc: Ticket locked: no

Description

The current code just keeps requesting frame 0.

Attachments

D2.patch (602 bytes) - added by Wayne McDougall <waynemcdougall@…> 8 months ago.
D2_v2.patch (2.8 KB) - added by Wayne McDougall <waynemcdougall@…> 8 months ago.

Change History

Changed 8 months ago by Wayne McDougall <waynemcdougall@…>

comment:1 Changed 8 months ago by Wayne McDougall <waynemcdougall@…>

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

@@ -4328,7 +4330,7 @@ VideoFrame* MythPlayer::GetRawVideoFrame(long long frameNumber)

 -        DoJumpToFrame(frameNumber, true, true);

 +        DoJumpToFrame(frameNumber, kInaccuracyNone);

comment:2 Changed 8 months ago by stuartm

  • Owner changed from cpinkham to stichnot
  • Status changed from new to assigned

comment:3 Changed 8 months ago by stichnot

  • Status changed from assigned to accepted
  • Version changed from Unspecified to Master Head
  • Milestone changed from unknown to 0.26.1

Changed 8 months ago by Wayne McDougall <waynemcdougall@…>

comment:4 Changed 8 months ago by Wayne McDougall <waynemcdougall@…>

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.

View

Add a comment

Modify Ticket

Action
as accepted
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.