[mythtv] [PATCH] MPEG2->MPEG2 commercial cut (myth patch)

Geoffrey Hausheer ou401cru02 at sneakemail.com
Sat Jan 3 09:47:55 EST 2004


On Fri, 02 Jan 2004 21:08:10 -0600, "Geoffrey Hausheer" said:
> On Fri, 2 Jan 2004 21:24:53 -0500, "Jim Paris" said:
> > The output of
> > 
> >   mythtranscode -c 1060 -s 2003-12-14T22:00:00 -p autodetect -d -l
> yep, I can duplicate it here.  The problem is that there is a 0xbe frame
> in your video.  I have no idea what that frame code means, and I can't
> process it correctly (it's not mentioned in my mpegvideo documentation). 
That's because it isn't part of a video stream, it is a padding frame. 
Libavformat shouldn't mark this as a video stream, so it looks like a
libavformat bug.  However, here is a better fix that will just ignore the
padding frame.

I'll have to look into the libavformat code sometime to see what it is
doing wrong I guess.
This should work better than the hack I sent earlier:
add this at line 621 instead:
           if (pictype == 'X') DPRINTF(1, "Frame type: %d\n", type);
        }
+        else if (vidblkptr[3] == 0xbe)
+        {
+            uint32_t skip = (vidblkptr[4] << 8) + vidblkptr[5];
+            frame_len = skip + 6;
+            DPRINTF(1, "pos: 0x%lx PAD-HEADER (%d bytes)\n", pos, skip);
+        }
        vidblkptr += frame_len;

Sorry for the manual patches, but I don't have the original file lying
around to diff against.

.Geoff


More information about the mythtv-dev mailing list