[MPlayer-dev-eng] mencoder and stream errors.

Bill Pringlemeir bpringlemeir at yahoo.com
Tue May 18 18:47:06 CEST 2010


I have filed a bug http://bugzilla.mplayerhq.hu/show_bug.cgi?id=1613

I think I have a handle on what the general issue is.
mpeg_decode_mb() returns an error to mpeg_decode_slice().  This skips
the ff_draw_horiz_band() call in the same so the 'vf_scale' module
never gets called with this slice [see libavcodec/mpeg12.c].

The scaler is expecting surrounding pixels to run the filter on but
they are not decoded (because of the error) .  I tried to feed the scaler
constants.  Like this,

    //Do horizontal scaling
    while(lastInLumBuf < lastLumSrcY) {
       uint8_t *src1= src[0]+(lastInLumBuf + 1 - srcSliceY)*srcStride[0];
       uint8_t *src2= src[3]+(lastInLumBuf + 1 - srcSliceY)*srcStride[3];
+            if(lastInLumBuf + 1 < srcSliceY) {
+               static uint32_t tmpBuf[1024] = { [0 ... 1023] = 0x003f7fbf };
+              src1 = (uint8_t*)&tmpBuf[0];
            }
        lumBufIndex++;

However, this results in the picture at row n being extended to the
bottom for the *entire* video (all remaining frames).  I don't understand 
how this can happen for more than one frame.  It looks like when 'srcSliceY' 
is zero things are reset.

I don't think that the inline assembler is meant to modify the scaler
context in any important way but I am not 100% sure about that.

Is there some other area of the decoder that might go haywire if a slice
is skipped?  Ie, some b-frame or p-frame decoding that might have some
i-frame gap or something like that?  Or maybe one of the other video filters 
is stepping on a variable or something like that.  I had tried to reduce the 
size of a sample, but the current smallest file I have is 

There are various solutions to the scaler to stop the SEGV, but I think something 
else is going on as well.  I guess there are other video decoders 
that I can/should try besides lavc?

Thanks for any help,
Bill Pringlemeir.






More information about the MPlayer-dev-eng mailing list