[FFmpeg-devel] [DEVEL][PATCH 1/2] ffmpeg: add ui64 type to SpecifierOpt

pkv.stream pkv.stream at gmail.com
Sun Nov 19 12:01:33 EET 2017


Hi Michael

>> Tell me the best course; or if you see a way to make my
>> MATCH_PER_STREAM_OPT() code less hacky.
> iam sure theres a way to do this less hacky
> why do you need a 2nd table ? or rather why does it not work if you
> put the entry in the main table ? (so there are 2 entries one for
> OPT_SPEC and one for teh callback, will it not send the data to both
> matching entries ?
>
>
>
>> Regards
>>
>>> [...]
>>>
>>>
>>> _______________________________________________
>>> ffmpeg-devel mailing list
>>> ffmpeg-devel at ffmpeg.org
>>> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>>
>>   cmdutils.h   |    1 +
>>   ffmpeg.h     |    3 +++
>>   ffmpeg_opt.c |   41 +++++++++++++++++++++++++++++++++++++----
>>   3 files changed, 41 insertions(+), 4 deletions(-)
>> 7c1249f0cb4daa1aebbf94b0e785e644997f754a  0001-ffmpeg-fix-ticket-6706.patch
>>  From 00c3c724544b16c19282b39644e2584f9c4a4181 Mon Sep 17 00:00:00 2001
>> From: pkviet <pkv.stream at gmail.com>
>> Date: Sat, 18 Nov 2017 00:26:50 +0100
>> Subject: [PATCH] ffmpeg: fix ticket 6706
>>
>> Fix regression with channel_layout option which is not passed
>> correctly from output streams to filters when the channel layout is not
>> a default one.
>> ---
>>   fftools/cmdutils.h   |  1 +
>>   fftools/ffmpeg.h     |  3 +++
>>   fftools/ffmpeg_opt.c | 41 +++++++++++++++++++++++++++++++++++++----
>>   3 files changed, 41 insertions(+), 4 deletions(-)
>>
>> diff --git a/fftools/cmdutils.h b/fftools/cmdutils.h
>> index 2997ee3..fa2b255 100644
>> --- a/fftools/cmdutils.h
>> +++ b/fftools/cmdutils.h
>> @@ -155,6 +155,7 @@ typedef struct SpecifierOpt {
>>           uint8_t *str;
>>           int        i;
>>           int64_t  i64;
>> +        uint64_t ui64;
>>           float      f;
>>           double   dbl;
>>       } u;
> please split this in a seperate patch
>
>

done.
I've split previous patch for channel_layout bug as requested and put 
the new OPT_SPEC channel layout option in main OptionDef.
patch 1/2 : adds a uint64_t type to SpecifierOpt ; useful for next patch 
of the series (this is not absolutely necessary but avoids memcpy back 
and forth between int64 and uint64, and reads cleaner)
patch 2/2: fixes ticket 6706 (channel_layout option not passed correctly 
from output stream to filters for non-default layouts)

Regards

-------------- next part --------------
From 550c6410e06f36f8d1dce68c11cc53ebd58f3568 Mon Sep 17 00:00:00 2001
From: pkviet <pkv.stream at gmail.com>
Date: Sat, 18 Nov 2017 22:19:46 +0100
Subject: [PATCH 1/2] ffmpeg: add ui64 type to SpecifierOpt

 Adds ui64 (uint64_t) as a possible type for SpecifierOpt. This enables
 use of uint64_t options with SpecifierOpt such as channel_layout
 when expressed as a 64 bit channel mask.

Signed-off-by: pkviet <pkv.stream at gmail.com>
---
 fftools/cmdutils.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fftools/cmdutils.h b/fftools/cmdutils.h
index 2997ee3..fa2b255 100644
--- a/fftools/cmdutils.h
+++ b/fftools/cmdutils.h
@@ -155,6 +155,7 @@ typedef struct SpecifierOpt {
         uint8_t *str;
         int        i;
         int64_t  i64;
+        uint64_t ui64;
         float      f;
         double   dbl;
     } u;
-- 
2.10.1.windows.1



More information about the ffmpeg-devel mailing list