[Ffmpeg-devel] Can I load a image file like this?
Shiqi Yu
sqyu
Sun Apr 10 13:02:57 CEST 2005
I want to load image files, but i have suffered the following errors for
many days :(
I use ffmpeg 0.4.9 pre 1
###############source code######################################
static int read_data_alloc_cb(void *opaque, AVImageInfo *info)
{
return 0;//do noting, just return 0;
}
int main(int argc, char * argv[])
{
ByteIOContext bi, *f=&bi;
AVImageInfo ImgInfo, * pinfo=&ImgInfo;
if (url_fopen(f, argv[1], URL_RDONLY) < 0)
{
fprintf(stderr, "open file %s error.\n", argv[1]);
return -1;
}
av_read_image(f, argv[1], NULL , read_data_alloc_cb, pinfo);
}
##############source code end####################################
when i run to av_read_image(f,...) function with argv[1]=image.png,
gdb show me the following error.
###############debug result######################################
(gdb) s
Program received signal SIGSEGV, Segmentation fault.
0x40072c90 in asf_init () from /usr/local/lib/libavformat.so
(gdb) s
Single stepping until exit from function asf_init,
which has no line number information.
Program terminated with signal SIGSEGV, Segmentation fault.
The program no longer exists.
(gdb) s
The program is not being run.
--
???
Shiqi Yu
_______________________________________________________________
National Laboratory of Pattern Recognition,
Institute of Automation, Chinese Academy of Sciences,
Beijing, P.R.China, 100080
Tel: +86-10-62653768 Fax: +86-10-62551993
Web: http://www.ia.ac.cn/personal/shiqi.yu
_______________________________________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20050410/8e0b6c1a/attachment.htm>
More information about the ffmpeg-devel
mailing list