fread harddisk files and crash problem!?

Microsoft Windows specific usage questions
Forum rules
Please post only Windows specific questions in this forum category. If you don't know where to post, please read the different forums' rules. Thanks.
passionggg
Blank Cone
Blank Cone
Posts: 18
Joined: 06 May 2010 07:27

fread harddisk files and crash problem!?

Postby passionggg » 16 May 2010 07:42

hi,all
today, i writed several codes in the file /modules/codec/avcodec/video.c to read a harddisk file into the memory. But crashed. the codes is as follows:
File *f;
char *path="F:/data.DAT";
int *table;
f=fopen(path,'rb');
tabel = malloc(SIZE);
fread(table,sizeof(int),Size,f);
then compile and make package-win32-base successfully. But can not open any files. once open then shut down.
What's the problem?
Hope for help!!!

VLC_help
Mega Cone Master
Mega Cone Master
Posts: 25661
Joined: 13 Sep 2006 14:16

Re: fread harddisk files and crash problem!?

Postby VLC_help » 16 May 2010 17:29

What is the SIZE or Size?

passionggg
Blank Cone
Blank Cone
Posts: 18
Joined: 06 May 2010 07:27

Re: fread harddisk files and crash problem!?

Postby passionggg » 17 May 2010 04:09

"SIZE" is the size of "data.DAT" that is malloc a memory space to place the data.DAT from harddisk.
and the "Size" is the "table" size.
for example, SIZE is (sizeof(int)*1280*720), Size is (1280*720).
Thanks

VLC_help
Mega Cone Master
Mega Cone Master
Posts: 25661
Joined: 13 Sep 2006 14:16

Re: fread harddisk files and crash problem!?

Postby VLC_help » 17 May 2010 16:59

Have you tried to use gdb?

passionggg
Blank Cone
Blank Cone
Posts: 18
Joined: 06 May 2010 07:27

Re: fread harddisk files and crash problem!?

Postby passionggg » 18 May 2010 02:55

Yes, i used gdb. But when give a breakpoint in the file /modules/codec/avcodec/video.c, the program can not run to this point, and a problem occured that i don't understand.
Now i do not go this way. I want to use the libvlc which i complied myself.
I set up an MFC project in VS2008 by using libvlc to read rtsp streaming from an IPCamera(h264 encoded stream). I want to get the each decoded frame data from the stream. Does VLC have a register or callback function that respond when each frame has decoded and the parameters of the function contains the decoded data of each frame? Like the function"libvlc_video_snapshot" which can take a snapshot of the video.
Thanks. Hope for answers.

VLC_help
Mega Cone Master
Mega Cone Master
Posts: 25661
Joined: 13 Sep 2006 14:16

Re: fread harddisk files and crash problem!?

Postby VLC_help » 18 May 2010 17:38

You can use memory output module aka vmem.

passionggg
Blank Cone
Blank Cone
Posts: 18
Joined: 06 May 2010 07:27

Re: fread harddisk files and crash problem!?

Postby passionggg » 19 May 2010 07:44

Thanks vlc_help and everyone.
now i have solved this problem using vmem video output. and see the Qt example.!


Return to “VLC media player for Windows Troubleshooting”

Who is online

Users browsing this forum: MSN [Bot] and 18 guests