[FFmpeg-devel] [PATCH v1 3/5] avfilter/vf_showinfo: display user data unregistered message

Limin Wang lance.lmwang at gmail.com
Wed Dec 18 02:55:04 EET 2019


On Tue, Dec 17, 2019 at 10:22:47PM +0100, Michael Niedermayer wrote:
> On Tue, Dec 17, 2019 at 06:22:15PM +0800, lance.lmwang at gmail.com wrote:
> > From: Limin Wang <lance.lmwang at gmail.com>
> > 
> > Signed-off-by: Limin Wang <lance.lmwang at gmail.com>
> > ---
> >  libavfilter/vf_showinfo.c | 20 ++++++++++++++++++++
> >  1 file changed, 20 insertions(+)
> > 
> > diff --git a/libavfilter/vf_showinfo.c b/libavfilter/vf_showinfo.c
> > index 31f6b32aa4..0d227983c2 100644
> > --- a/libavfilter/vf_showinfo.c
> > +++ b/libavfilter/vf_showinfo.c
> > @@ -169,6 +169,23 @@ static void dump_content_light_metadata(AVFilterContext *ctx, AVFrameSideData *s
> >             metadata->MaxCLL, metadata->MaxFALL);
> >  }
> >  
> > +static void dump_user_data_unregistered_metadata(AVFilterContext *ctx, AVFrameSideData *sd)
> > +{
> > +    const int uuid_size = 16;
> > +
> > +    if (sd->size < uuid_size) {
> > +        av_log(ctx, AV_LOG_ERROR, "invalid data");
> > +        return;
> > +    }
> 
> The need for a UUID (of 16bytes) is not described in the text describing 
> this side data type
By the specs:
user_data_unregistered( payloadSize ) { C Descriptor
uuid_iso_iec_11578                      5 u(128)
for( i = 16; i < payloadSize; i++ )
user_data_payload_byte                  5 b(8)
}

So it's need to make sure the uuid is 16bytes, now the user buffer = uuid + user_data, for the uuid need keep same when copy to output.


> 
> [...]
> 
> -- 
> Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
> 
> Modern terrorism, a quick summary: Need oil, start war with country that
> has oil, kill hundread thousand in war. Let country fall into chaos,
> be surprised about raise of fundamantalists. Drop more bombs, kill more
> people, be surprised about them taking revenge and drop even more bombs
> and strip your own citizens of their rights and freedoms. to be continued



> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".



More information about the ffmpeg-devel mailing list