[FFmpeg-devel] libavutil/encryption_info: Allow multiple init info.

Michael Niedermayer michael at niedermayer.cc
Sat Jun 23 01:41:29 EEST 2018


On Thu, Jun 21, 2018 at 12:01:09PM -0700, Jacob Trimble wrote:
> On Thu, Jun 21, 2018 at 9:48 AM Michael Niedermayer
> <michael at niedermayer.cc> wrote:
> >
> > > +        if (UINT32_MAX == init_info_count ||
> > > +            UINT32_MAX - *side_data_size < FF_ENCRYPTION_INIT_INFO_EXTRA ||
> > > +            UINT32_MAX - *side_data_size - FF_ENCRYPTION_INIT_INFO_EXTRA < info->system_id_size ||
> > > +            UINT32_MAX - *side_data_size - FF_ENCRYPTION_INIT_INFO_EXTRA - info->system_id_size < info->data_size) {
> > >              return NULL;
> > > +        }
> >
> > you can simplify this with (u)int64_t
> >
> 
> Done

>  encryption_info.c |  146 +++++++++++++++++++++++++++++++++++-------------------
>  encryption_info.h |    5 +
>  2 files changed, 100 insertions(+), 51 deletions(-)
> 676617bd11d32ea552e0fdb9fcdb2486241ab9f0  0001-libavutil-encryption_info-Allow-multiple-init-info-8.patch
> From f440fe2be172672c439fa8b216b08a8d0895f76f Mon Sep 17 00:00:00 2001
> From: Jacob Trimble <modmaker at google.com>
> Date: Mon, 23 Apr 2018 10:33:58 -0700
> Subject: [PATCH] libavutil/encryption_info: Allow multiple init info.
> 
> It is possible for there to be multiple encryption init info structure.
> For example, to support multiple key systems or in key rotation.  This
> changes the AVEncryptionInitInfo struct to be a linked list so there
> can be multiple structs without breaking ABI.
> 
> Signed-off-by: Jacob Trimble <modmaker at google.com>
> ---
>  libavutil/encryption_info.c | 146 +++++++++++++++++++++++-------------
>  libavutil/encryption_info.h |   5 ++
>  2 files changed, 100 insertions(+), 51 deletions(-)

will apply

thanks

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Those who are too smart to engage in politics are punished by being
governed by those who are dumber. -- Plato 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20180623/542795ec/attachment.sig>


More information about the ffmpeg-devel mailing list