[vlc-devel] Decoder get stuck when trying copy decoded picture to p_pic

Florian pflooo at yahoo.fr
Thu Aug 2 11:45:05 CEST 2007


I am writing a custom encoder and decoder. When the
decoder finished decode a picture I try to copy it to
p_pic got from the vout.

I copy this picture plane by plane with the following
code (taken from the dirac codec decoder) :
     int i_plane;
    /* Copy picture stride by stride */
    for( i_plane = 0; i_plane < p_pic->i_planes;
i_plane++ )
    {
        int i_line, i_width, i_dst_stride;
        uint8_t *p_src = p_block->p_buffer[i_plane];
        uint8_t *p_dst = p_pic->p[i_plane].p_pixels;

        i_width = p_pic->p[i_plane].i_visible_pitch;
        i_dst_stride = p_pic->p[i_plane].i_pitch;
		
        for( i_line = 0; i_line <
p_pic->p[i_plane].i_visible_lines; i_line++ )
        {
            p_dec->p_libvlc->pf_memcpy( p_dst, p_src,
i_width );
            p_src += i_width;
            p_dst += i_dst_stride;
        }
    }

In my case I've got one plane, 288 visible lines and
width is 352. Decoder thread get stuck at the first
pf_memcpy occurence ; the encoder doesn't stop
producing blocks.

Thanks for help !


      _____________________________________________________________________________ 
Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail 
_______________________________________________
vlc-devel mailing list
vlc-devel at videolan.org
http://mailman.videolan.org/listinfo/vlc-devel


More information about the vlc-devel mailing list