[FFmpeg-devel] [PATCH 2/2] flvdec: Add an option for exporting unknown metadata packets as opaque data

Martin Storsjö martin at martin.st
Sat Oct 27 21:22:18 EEST 2018


On Sat, 27 Oct 2018, Michael Niedermayer wrote:

> On Thu, Oct 25, 2018 at 03:59:17PM +0300, Martin Storsjö wrote:
>> ---
>>  libavformat/flv.h    |  1 +
>>  libavformat/flvdec.c | 21 +++++++++++++++++----
>>  2 files changed, 18 insertions(+), 4 deletions(-)
>
> [...]
>> @@ -1290,6 +1302,7 @@ static const AVOption options[] = {
>>      { "flv_full_metadata", "Dump full metadata of the onMetadata", OFFSET(dump_full_metadata), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VD },
>>      { "flv_ignore_prevtag", "Ignore the Size of previous tag", OFFSET(trust_datasize), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VD },
>>      { "missing_streams", "", OFFSET(missing_streams), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 0xFF, VD | AV_OPT_FLAG_EXPORT | AV_OPT_FLAG_READONLY },
>> +    { "export_opaque_meta", "", OFFSET(export_opaque_meta), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VD },
>>      { NULL }
>
> I think this together with doc/demuxers.texi (which doesnt document this)
> is not enough to use this option by a user

Oh right, I had forgotten to actually write something here.

> also why is this conditional ? is there a disadvantage of always
> exporting this ?

Not sure - I thought it'd be less behaviour change and less risk of 
potentially confusing packets for unsuspecting users by not doing it by 
default. But as any normal flv stream doesn't contain any such packets, it 
might be fine to just expose them all the time.

// Martin


More information about the ffmpeg-devel mailing list