Dear:

On Tue, Apr 14, 2009 at 7:32 AM, Cai, Xin <[email protected]> wrote:

> Hi guys
>
> Basically my program was working fine for a while but after I upgraded
> AVLibrary code to the latest and greatest I am having issues where SDL
> is crashing. Basically I grab a video frame, encodes it, sends it out
> via rtp stream and then take that same encoded frame and decode its and
> plays it to the screen using SDL on the local computer (think of it a
> preview player). Before I did the update of the AVLibrary code my
> program works fine, but after I updated the AVLibrary code,
> SDL_UnlockYUVOverlay() throws a seg fault. Here is what my code looks
> likes
>
>
> // Did we get a video frame?
>
>      if(frameFinished)
>
>      {
>
>            AVPicture pict;
>
>
>

Please add the following code:

memset(&pict,0,sizeof(AVPicture));



>
>            SDL_LockYUVOverlay(bmp);
>
>            pict.data[0] = bmp->pixels[0];
>
>            pict.data[1] = bmp->pixels[2];
>
>            pict.data[2] = bmp->pixels[1];
>
>
>
>            pict.linesize[0] = bmp->pitches[0];
>
>            pict.linesize[1] = bmp->pitches[2];
>
>            pict.linesize[2] = bmp->pitches[1];
>
>
> Am I doing anything wrong? I have spent a loooottt of time trying to
> figure this out so any help you guys can offer would be greatly
> appreciated.
>
>
-- 
----------------------------------------------
Inspired by http://ppnext.com
Your potential. Our passion.
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user

Reply via email to