[FFmpeg-devel] [PATCH 1/2] lavu/opt: handle NULL obj in av_opt_next

Lukasz Marek lukasz.m.luki2 at gmail.com
Sun Nov 23 01:10:21 CET 2014


On 23.11.2014 00:59, Clément Bœsch wrote:
> On Sun, Nov 23, 2014 at 12:58:06AM +0100, Lukasz Marek wrote:
>> It indirectly also fixes av_opt_free for NULL objs.
>>
>> Signed-off-by: Lukasz Marek <lukasz.m.luki2 at gmail.com>
>> ---
>>   libavutil/opt.c | 2 ++
>>   1 file changed, 2 insertions(+)
>>
>> diff --git a/libavutil/opt.c b/libavutil/opt.c
>> index 47b1f0c..85330c9 100644
>> --- a/libavutil/opt.c
>> +++ b/libavutil/opt.c
>> @@ -50,6 +50,8 @@ const AVOption *av_next_option(void *obj, const AVOption *last)
>>
>>   const AVOption *av_opt_next(void *obj, const AVOption *last)
>>   {
>> +    if (!obj)
>> +        return NULL;
>>       AVClass *class = *(AVClass**)obj;
>
> AVClass *class must be declared above

Thx for notice, updated patch is attached.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-lavu-opt-handle-NULL-obj-in-av_opt_next.patch
Type: text/x-patch
Size: 953 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20141123/5e92626e/attachment.bin>


More information about the ffmpeg-devel mailing list