[FFmpeg-devel] [PATCH 9/9] lavf/ffm: use AVOption API to store/restore stream properties

Lukasz Marek lukasz.m.luki2 at gmail.com
Thu Nov 13 00:50:38 CET 2014


On 12.11.2014 03:19, Michael Niedermayer wrote:
> On Wed, Nov 12, 2014 at 12:02:07AM +0100, Lukasz Marek wrote:
>> On 11.11.2014 08:31, Lukasz Marek wrote:
>>> This is a generic solution that will not reqiore modifications when new options are added.
>>> This also fixes problem with current implementation when qmin or qmax=-1.
>>> Only 8 bits was sent and read back as 255.
>>>
>>> Fixes #1275
>>> Fixes #1461
>>>
>>> Signed-off-by: Lukasz Marek <lukasz.m.luki2 at gmail.com>
>>> ---
>>>   libavformat/ffmdec.c | 20 +++++++++++++++
>>>   libavformat/ffmenc.c | 70 +++++++++++++++-------------------------------------
>>>   2 files changed, 40 insertions(+), 50 deletions(-)
>>
>> Updated version attached.
>
> not related to this patch specifically but please test
> fate-opt under valgrind
> it seems one of the patches adds a memleak
>
> ==16696== 4 bytes in 1 blocks are definitely lost in loss record 1 of 6
> ==16696==    at 0x4C2A6C5: memalign (vg_replace_malloc.c:727)
> ==16696==    by 0x4C2A760: posix_memalign (vg_replace_malloc.c:876)
> ==16696==    by 0x40FC2D: av_malloc (mem.c:95)
> ==16696==    by 0x402022: set_string_binary (opt.c:142)
> ==16696==    by 0x40617F: av_opt_set_defaults2 (opt.c:1235)
> ==16696==    by 0x405ED1: av_opt_set_defaults (opt.c:1175)
> ==16696==    by 0x40809C: main (opt.c:1986)

This is leak in the test itself :P
Fix was trivial so I pushed it directly.

I uploaded updated patch, that removes necessity of the patch I dropped
"[PATCH] lavc/options: set all codec options to defaults"

Note: it extends opt serialize with new flag, so before a sumbit I will 
move that chunk to commit that introduce it.

I pushed to github current patches too.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-lavf-ffm-use-AVOption-API-to-store-restore-stream-pr.patch
Type: text/x-patch
Size: 8699 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20141113/0e51f8d9/attachment.bin>


More information about the ffmpeg-devel mailing list