hi thanks Carl,

Here is my code using avio_open2:

int decode_interrupt_cb(void) {
    // Do something
}

const AVIOInterruptCB int_cb = { decode_interrupt_cb, NULL };


int main(int argc, char *argv[]) {

....

    AVFormatContext *pFormatCtx;

    // Open video file
    if(avformat_open_input(&pFormatCtx, filename, NULL, NULL)!=0)
        return -1;

    pFormatCtx->interrupt_callback = int_cb;

    if (avio_open2(&pFormatCtx->pb, filename, AVIO_FLAG_READ,
     &pFormatCtx->interrupt_callback, NULL))
        return -1;
...
}



Should I have called the avio_open2 first or not?

P.S.Q
_______________________________________________
Libav-user mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/libav-user

Reply via email to