[XviD-devel] Fw: libxvidcore decompression

reno reballos rreballos at yahoo.com
Wed Apr 16 14:39:57 CEST 2008


 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);
    long lFileSize = ftell(fpi);
    unsigned char *buffer = NULL;
    buffer = (unsigned char *) malloc (lFileSize);
    int useful_bytes = fread(buffer, 1, lFileSize, fpi);
    if(useful_bytes==NULL)
          Msg(TEXT("Errorreading to file"));

I GOT ZERO BUFFER VALUE HERE!..

looking forward to hear from you....
thank you for the time...

regards,
reno
 







      ____________________________________________________________________________________
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