[FFmpeg-devel] Segmentation fault in libquvi.c

Lukasz Marek lukasz.m.luki2 at gmail.com
Wed Apr 8 15:51:36 CEST 2015


On 8 April 2015 at 15:37, Gilles Chanteperdrix <
gilles.chanteperdrix at xenomai.org> wrote:

> On Wed, Apr 08, 2015 at 02:40:52PM +0200, Michael Niedermayer wrote:
> > On Wed, Apr 08, 2015 at 10:55:45AM +0200, Gilles Chanteperdrix wrote:
> > > Hi,
> > >
> > > I just triend libquvi, and get a segmentation fault in the
> > > libquvi_read_header function, because ff_copy_whitelists is called
> > > before qc->fmtctx is allocated by avformat_open_input. I added a
> > > call to avformat_alloc_context() before ff_copy_whitelists and the
> > > libquvi demuxer works.
> > >
> > > However, I wonder how to fix this properly: the error handling
> > > labels look backward, so that I am not sure where to free the
> > > allocated context in case of error.
> >
> > applied this, yes its correct
>
> Ok, there are other details missing, the stream does not get a
> duration, start_time and bitrate. This can easily be fixed, but as
> wm4 said libquvi seems an abandoned project.
>
> Would there be any interest in a solution based on youtube-dl? It
> seems to be the standard, these days. I just ran a few tests:
>
> youtube -qs 'url' returns 0 or 1 depending on whether the url can be
> parsed by the tool
>
> youtube -e 'url' prints the stream title
>
> and youtube -f 'url' prints the video url.
>
> To use this portably, we can use system() and redirect the
> output to a temporary file, and read the title or URL from the file.
> Or is popen available on all platforms where ffmpeg runs?
>
> Is it a clean enough solution? If yes, I can submit the patch adding
> this solution. From what I could see, all solutions to parse youtube
> (including quvi) are based on scripts anyway.
>

I submitted a patch more that year ago to support youtube natively, as I
remember this was based on the script you mention, but it was rejected
because we have libquvi. [sic!]
Project not actively developed is not the same as project not working.
In corner case it is not developed because everything is working perfectly.


More information about the ffmpeg-devel mailing list