[Libva] VADestroyImage giving segmentation fault

Varun Dua varundua007 at gmail.com
Thu Oct 14 07:55:41 PDT 2010


Hi

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).
*
VAImage vaimage;
*
* unsigned char *imagedata = NULL;
FILE *fp1;
char file[100];
printf("%x\n",myimgfmt.fourcc);
vastatus =
pfn_vaCreateImage(vaapi->display,&myimgfmt,avcc->width,avcc->height,&vaimage);
checkVaStatus();
pfn_vaGetImage
(vaapi->display,va_surface_ids[current_surface],0,0,avcc->width,avcc->height,vaimage.image_id);
checkVaStatus();
imagedata = (char *)malloc(vaimage.data_size*sizeof(char));
pfn_vaMapBuffer(vaapi->display,vaimage.buf,(void *)&imagedata);
sprintf(file,"brga/frame%d.raw",framenumber++);
fp1 = fopen(file,"wb");
fwrite(imagedata,vaimage.data_size*sizeof(unsigned char),1,fp1);
fclose(fp1);
free(imagedata);
imagedata = NULL;
vastatus = pfn_vaUnmapBuffer(vaapi->display,vaimage.buf);
checkVaStatus();
vastatus = vaDestroyImage(vaapi->display,vaimage.image_id);
*

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 ?

Regards
Varun
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/libva/attachments/20101014/9c6408e3/attachment.htm>


More information about the Libva mailing list