[Libav-user] Two problems with ffmpeg-2.5 while reading a video dvd

szukw000 at arcor.de szukw000 at arcor.de
Mon Dec 22 05:11:03 CET 2014

I have two problems reading a video dvd with 'ffmpeg-2.5'.

I have written a program (based on ffplay) with a FLTK gui.
When the program reads a dvd the following protocol is registered:

void DVDREADER_register_dvd_protocol(void)
    memset(&ff_dvd_protocol, 0, sizeof(URLProtocol));

    ff_dvd_protocol.name = "dvd";
    ff_dvd_protocol.url_open = dvd_open;
    ff_dvd_protocol.url_read = dvd_read;
    ff_dvd_protocol.url_close = dvd_close;
    ff_dvd_protocol.priv_data_size = sizeof(DVDREADERINFO);



The first time the contents of the dvd is shown fairly good.
But when I stop the transfer and then restart reading the dvd,
nothing is shown: the function 'dvd_read()' is not called. I
must exit the program and restart it.

The second problem is with

static int dvd_open(URLContext *urlc, const char *path, int flags)
    dvdreader = (DVDREADERINFO*)calloc(1, sizeof(DVDREADERINFO));

    if(dvdreader == NULL) return -1;

    if(strncmp(path, "dvd://", 6) == 0)
     path += 6;

    if(dvdreader_open(path, dvdreader) == 0)
    dvdreader = NULL;
    return -1;
    urlc->priv_data = dvdreader;

    return 0; //OK


'urlc->priv_data' is not NULL when the program assigns 'dvdreader'.

Does anybody know how to solve the first problem?

Is the second problem normal?


More information about the Libav-user mailing list