From: Pierre-Anthony Lemieux <pal@sandflow.com>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] [PATCH v3 6/6] avfilter/showinfo: refactor to use avutil/uuid
Date: Tue, 31 May 2022 08:54:36 -0700
Message-ID: <CAF_7JxB0=DdjFvxhzxwKVoHAUjrCFnu9uNp2pJRoSR15aos1oQ@mail.gmail.com> (raw)
In-Reply-To: <DB6PR0101MB2214D9CD8C158908C90BC5C28FDC9@DB6PR0101MB2214.eurprd01.prod.exchangelabs.com>
On Tue, May 31, 2022 at 12:10 AM Andreas Rheinhardt
<andreas.rheinhardt@outlook.com> wrote:
>
> pal@sandflow.com:
> > From: Pierre-Anthony Lemieux <pal@palemieux.com>
> >
> > ---
> > libavfilter/vf_showinfo.c | 17 +++++------------
> > 1 file changed, 5 insertions(+), 12 deletions(-)
> >
> > diff --git a/libavfilter/vf_showinfo.c b/libavfilter/vf_showinfo.c
> > index 12d39310ef..0d6f2805bb 100644
> > --- a/libavfilter/vf_showinfo.c
> > +++ b/libavfilter/vf_showinfo.c
> > @@ -42,6 +42,7 @@
> > #include "libavutil/mastering_display_metadata.h"
> > #include "libavutil/video_enc_params.h"
> > #include "libavutil/detection_bbox.h"
> > +#include "libavutil/uuid.h"
> >
> > #include "avfilter.h"
> > #include "internal.h"
> > @@ -421,29 +422,21 @@ static void dump_video_enc_params(AVFilterContext *ctx, const AVFrameSideData *s
> >
> > static void dump_sei_unregistered_metadata(AVFilterContext *ctx, const AVFrameSideData *sd)
> > {
> > - const int uuid_size = 16;
> > const uint8_t *user_data = sd->data;
> > int i;
> >
> > - if (sd->size < uuid_size) {
> > + if (sd->size < AV_UUID_LEN) {
> > av_log(ctx, AV_LOG_ERROR, "invalid data(%"SIZE_SPECIFIER" < "
> > - "UUID(%d-bytes))\n", sd->size, uuid_size);
> > + "UUID(%d-bytes))\n", sd->size, AV_UUID_LEN);
> > return;
> > }
> >
> > av_log(ctx, AV_LOG_INFO, "User Data Unregistered:\n");
> > - av_log(ctx, AV_LOG_INFO, "UUID=");
> > - for (i = 0; i < uuid_size; i++) {
> > - av_log(ctx, AV_LOG_INFO, "%02x", user_data[i]);
> > - if (i == 3 || i == 5 || i == 7 || i == 9)
> > - av_log(ctx, AV_LOG_INFO, "-");
> > - }
> > - av_log(ctx, AV_LOG_INFO, "\n");
> > + av_log(ctx, AV_LOG_INFO, "UUID=" AV_PRI_UUID "\n", AV_UUID_ARG(user_data));
> >
> > av_log(ctx, AV_LOG_INFO, "User Data=");
> > - for (; i < sd->size; i++) {
> > + for (i = 16; i < sd->size; i++)
>
> You can (and should) now use a for-loop with variable-declaration (and
> the type should be changed to size_t, as AVFrameSideData is now size_t,
> too).
Will fix. Thanks.
>
> > av_log(ctx, AV_LOG_INFO, "%02x", user_data[i]);
> > - }
> > av_log(ctx, AV_LOG_INFO, "\n");
> > }
> >
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
next prev parent reply other threads:[~2022-05-31 15:54 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-31 3:13 [FFmpeg-devel] [PATCH v3 1/6] avutil/uuid: add utility library for manipulating UUIDs as specified in RFC 4122 pal
2022-05-31 3:13 ` [FFmpeg-devel] [PATCH v3 2/6] avutil/tests/uuid: add uuid tests pal
2022-05-31 3:13 ` [FFmpeg-devel] [PATCH v3 3/6] avformat/mov: refactor to use avutil/uuid pal
2022-05-31 3:13 ` [FFmpeg-devel] [PATCH v3 4/6] avformat/smoothstreamingenc: " pal
2022-05-31 3:13 ` [FFmpeg-devel] [PATCH v3 5/6] avformat/imf: " pal
2022-05-31 3:13 ` [FFmpeg-devel] [PATCH v3 6/6] avfilter/showinfo: " pal
2022-05-31 7:10 ` Andreas Rheinhardt
2022-05-31 15:54 ` Pierre-Anthony Lemieux [this message]
2022-05-31 10:39 ` [FFmpeg-devel] [PATCH v3 1/6] avutil/uuid: add utility library for manipulating UUIDs as specified in RFC 4122 Andreas Rheinhardt
2022-05-31 15:54 ` Pierre-Anthony Lemieux
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAF_7JxB0=DdjFvxhzxwKVoHAUjrCFnu9uNp2pJRoSR15aos1oQ@mail.gmail.com' \
--to=pal@sandflow.com \
--cc=ffmpeg-devel@ffmpeg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git