Hi<br><br>I am decoding a H.264 video using Nvidia&#39;s Graphics Card and Vaapi Library on Ubuntu 10.04. I am able to decode an entire video and display it using vaPutSurface, no problems at all. Now I need the data in RGBA format so I get the data in BRGA format which is supported in my implementation (I can convert it into RGBA). <br>

<div style="margin-left: 40px;"><i><br>VAImage vaimage;<br></i></div><div style="margin-left: 40px;"><i>        unsigned char *imagedata = NULL;<br>        FILE *fp1;<br>        char file[100];<br>        printf(&quot;%x\n&quot;,myimgfmt.fourcc);<br>

        vastatus = pfn_vaCreateImage(vaapi-&gt;display,&amp;myimgfmt,avcc-&gt;width,avcc-&gt;height,&amp;vaimage);<br>        checkVaStatus();<br>        pfn_vaGetImage (vaapi-&gt;display,va_surface_ids[current_surface],0,0,avcc-&gt;width,avcc-&gt;height,vaimage.image_id);<br>

        checkVaStatus();<br>        imagedata = (char *)malloc(vaimage.data_size*sizeof(char));<br>        pfn_vaMapBuffer(vaapi-&gt;display,vaimage.buf,(void *)&amp;imagedata);<br>        sprintf(file,&quot;brga/frame%d.raw&quot;,framenumber++);<br>

        fp1 = fopen(file,&quot;wb&quot;);<br>        fwrite(imagedata,vaimage.data_size*sizeof(unsigned char),1,fp1);<br>        fclose(fp1);<br>        free(imagedata);<br>        imagedata = NULL;<br>        vastatus = pfn_vaUnmapBuffer(vaapi-&gt;display,vaimage.buf);<br>

        checkVaStatus();<br>vastatus = vaDestroyImage(vaapi-&gt;display,vaimage.image_id);<br></i></div><br>Everthing is working fine except that I am getting Segmentaion fault at vaDestroyImage. I am unable to correct this error. Can anybody help me with that ?<br>

<br>Regards<br>Varun<br>