[Libav-user] [libav-user] is avio_set_interrupt_cb deprecated?
Quy Pham Sy
phamsyquybk at gmail.com
Thu Oct 11 02:17:34 CEST 2012
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
More information about the Libav-user
mailing list