Hi<br><br>I am decoding a H.264 video using Nvidia'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("%x\n",myimgfmt.fourcc);<br>
        vastatus = pfn_vaCreateImage(vaapi->display,&myimgfmt,avcc->width,avcc->height,&vaimage);<br>        checkVaStatus();<br>        pfn_vaGetImage (vaapi->display,va_surface_ids[current_surface],0,0,avcc->width,avcc->height,vaimage.image_id);<br>
        checkVaStatus();<br>        imagedata = (char *)malloc(vaimage.data_size*sizeof(char));<br>        pfn_vaMapBuffer(vaapi->display,vaimage.buf,(void *)&imagedata);<br>        sprintf(file,"brga/frame%d.raw",framenumber++);<br>
        fp1 = fopen(file,"wb");<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->display,vaimage.buf);<br>
        checkVaStatus();<br>vastatus = vaDestroyImage(vaapi->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>