[mythtv] PATCH: Commercial detection/skip using blank frames

Chris Pinkham cpinkham at bc2va.org
Fri Feb 21 21:23:14 EST 2003

> On Friday 21 February 2003 10:55 am, Chris Pinkham wrote:
> > Attached is a much better implemention of the commercial skipping patch
> > I uploaded earlier this week.  I've been using this for a couple nights.

> I've just committed this -- I did fix the segfault that was occurring on 
> exiting playback, though.  I also disabled the automatic commercial skip by 

> Let me know if you agree/disagree with any of my changes.

I haven't had a chance to recompile and test it (wife's watching TV), but
I notice that you got rid of the GetFrameRetainWPos function.  The
function would decode a frame without incrementing wpos to the next
position.  Then you could use vbuffer[wpos] to refernce that frame.

Now it looks like it's just calling GetFrame(1,true); which looks like it
still increments wpos inside GetFrame.  So when GetFrameVariance(wpos)
is called, it's not really looking at the frame just read in, it's looking
at the frame which is next in the buffer (wpos points to the next available
write position right?)  So it's not checking for a blank frame where it
thinks it is since it's looking in the wrong place in the buffer.

I might be looking at this wrong, but wanted to speak up sooner rather
than later since it's in CVS already.

Other than that it looks good to me (course I haven't had a chance to
retest it yet though).  :)  So you tested the 'Z' manual mode?  Was it
working OK?


** Chris Pinkham                  Linux v2.2.18, Sane v1.0.4, Cajun v3.0-8 **
** cpinkham at bc2va.org                          http://www.bc2va.org/chris/ **

More information about the mythtv-dev mailing list