Bug#755717: gst-libav1.0: segfaults when FFmpeg/Libav is built with --enable-small

Andreas Cadhalpun andreas.cadhalpun at googlemail.com
Mon Oct 6 19:30:40 UTC 2014


Hi Sebastian,

On 05.10.2014 19:52, Sebastian Dröge wrote:
> On Di, 2014-07-22 at 19:06 +0200, Andreas Cadhalpun wrote:
>> gst-libav uses AVInputFormat.long_name pointers without checking if they
>> are NULL. But that happens for example, when FFmpeg/Libav is configured
>> with --enable-small.
>> In that case the plugin segfaults, when gstreamer tries to load it (see
>> the attached backtrace).
>>
>> So please add the necessary checks for NULL pointers.
>
> Well, just don't build libav/ffmpeg with --enable-small :) This is not
> supported by gst-libav and even if we add NULL checks everywhere would
> result in a package with less functionality. Basically all demuxers and
> muxers would be disabled.

The problem is that it is not guaranteed that every AVInputFormat has a 
long name. And even if only one doesn't, gst-libav becomes unusable, 
because it crashes during initialization.
This happened e.g. with FFmpeg 2.3 and can be easily reproduced, when 
building with --enable-small.

Anyway it isn't advisable to rely on long_name, because that is meant 
only as a human-readable description, which might e.g. get reformulated.

It would be better to only rely on AVInputFormat.name, which is a comma 
separated list of short names for the format and is guaranteed to be 
present.

Best regards,
Andreas



More information about the pkg-gstreamer-maintainers mailing list