[XviD-devel] Fw: libxvidcore decompression

reno reballos rreballos at yahoo.com
Wed Apr 16 15:10:57 CEST 2008


 Hi Master Dark Sylinc,

Sorry... for using the all caps.. i am not aware about that thing that it means yelling...
Sorry.. i dont mean it.. and thank you for giving me hint too..  from now on i will  be very cautious about that matter...

with apology,
reno

----- Original Message ----
From: Stephan Assmus <superstippi at gmx.de>
To: xvid-devel at xvid.org
Sent: Wednesday, April 16, 2008 8:48:56 PM
Subject: Re: [XviD-devel] Fw:  libxvidcore decompression


reno reballos wrote:
>  Hi DarkSylinc,
> 
> i have done already the encoding part using the xvid_encraw as reference 
> forthe encoding of the video, no problem with the playback of the encoded 
> videoand right now i am stock with the decoding part of the compressed 
> video that ihave. specifically in the reading of the compressed video 
> file from directoryjust like what the xvid_decraw did in the 
> decompression of the compressed videobut the only problem is when i read 
> the file i get zero as a return value inreturn decompression does not 
> decompress any  data at all: this is exactlywhat i did in the reading of 
> the .m4v file
> 
> 1. open the file through 
>      FILE *fpi = NULL;
>     fpi =  fopen("c:\\sample_file.m4v","r+b");
>     if(fpi==NULL)
>          Msg(TEXT("Error openingthe file"));
> 
> I GOT NO ERROR WHEN OPENING THE FILE...
> 
> 2. determine the buffer size to allocate for the read stream buffer 
> through
>     fseek(fpi,0,SEEK_END);

You are seeking to the end of the file!

>     long lFileSize = ftell(fpi);
>     unsigned char *buffer = NULL;
>     buffer = (unsigned char *) malloc (lFileSize);
>     int useful_bytes = fread(buffer, 1, lFileSize, fpi); 

And of course you get zero bytes when reading it, since it is already at 
the end. :-)

>     if(useful_bytes==NULL)
>           Msg(TEXT("Errorreading to file"));
> 
> I GOT ZERO BUFFER VALUE HERE!..

Best regards,
-Stephan

P.S. Don't use ALL-CAPS typing, it could be misunderstood as "yelling". :-)


_______________________________________________
XviD-devel mailing list
XviD-devel at xvid.org
http://list.xvid.org/mailman/listinfo/xvid-devel






      ____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ


More information about the XviD-devel mailing list