id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc,mlocked 9997,patch: Fix commercial flagging to return consistent results,kevin@…,markk,"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. -- Kevin ",Bug Report - General,closed,minor,,MythTV - Mythcommflag,0.24.1,medium,Fixed,,,0