Opened 4 years ago
Closed 4 years ago
Last modified 4 years ago
patch: Fix commercial flagging to return consistent results
|Reported by:||kevin@…||Owned by:||markk|
|Component:||MythTV - Mythcommflag||Version:||0.24.1|
Running mythcommflag on a recording, and comparing the results of --getskiplist after rerunning the command several times would result in inconsistent results. One would expect to get the same results every time. Also, the results of commercial flagging were usually rather poor (for me). This seemed to be a regression in 0.24.
I believe the problem was with the implementation of MythPlayer::GetRawVideoFrame?. At the end of the function, it would return the result of GetLastDecodedFrame?. I believe this to be incorrect. When printing the frame numbers of the frames returned, sometimes I would get the same frame number returned multiple times, and other times it would skip a frame or two (or more). Basically, it's returning the frame from the tail of the queue, when it should be returning the frame from the head of the queue.
My fix is to call StartDisplayingFrame?, followed by GetLastShownFrame?. This returns the frame from the head of the queue, and printing the frame numbers always results in a nice even output of frame numbers, no duplicates, no skips.
Now my commercial flagging is much improved, and rerunning mythcommflag multiple times on a recording results in the same results each time.
Change History (4)
Changed 4 years ago by kevin@…
comment:1 Changed 4 years ago by tralph
- Owner changed from cpinkham to markk
- Status changed from new to assigned
comment:2 Changed 4 years ago by mdean
- Milestone changed from unknown to 0.24.2
- Resolution set to Fixed
- Status changed from assigned to closed
comment:3 Changed 4 years ago by stuartm
- Milestone 0.24.2 deleted