[FFmpeg-devel] fseeko in qt-faststart.c cause problem on 64-bits box

Surf Chen surfchen
Wed Mar 19 10:34:20 CET 2008

Below shows what the problem is. If change the fseeko to fseek,all goes well.

#include <stdio.h>
#include <stdlib.h>
#include <inttypes.h>
int main(int argc, char *argv[]) {
    unsigned char *ftyp_atom = 0;
    unsigned char atom_bytes[ATOM_PREAMBLE_SIZE];
    FILE *infile = fopen(argv[1], "rb");
    ftyp_atom = malloc(32);
    fread(atom_bytes, ATOM_PREAMBLE_SIZE, 1, infile);
    fseeko(infile, -ATOM_PREAMBLE_SIZE, SEEK_CUR);
    int rs=fread(ftyp_atom, 2, 1, infile);
    printf ("rs:%d\n",rs);
    return 0;

More information about the ffmpeg-devel mailing list