[FFmpeg-devel] [PATCH] libavformat/usmdec: add support for HCA stream decryption

Pavel Roslyy roslypav at gmail.com
Thu Jun 26 10:07:30 EEST 2025


Hi Andreas,

On Wed, Jun 25, 2025 at 5:42 PM Andreas Rheinhardt
<andreas.rheinhardt at outlook.com> wrote:
>
> Pavel Roslyy:
> > [...]
> >
> > +#define OFFSET(x) offsetof(USMDemuxContext, x)
> > +#define FLAGS AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_DECODING_PARAM
> > +static const AVOption usm_options[] = {
> > +    { "hca_lowkey",
> > +        "Low key used for handling CRI HCA streams", OFFSET(hca_keyl),
> > +        AV_OPT_TYPE_INT64, {.i64=0}, .min = 0, .max = UINT32_MAX, .flags = FLAGS, },
> > +    { "hca_highkey",
> > +        "High key used for handling CRI HCA streams", OFFSET(hca_keyh),
> > +        AV_OPT_TYPE_INT64, {.i64=0}, .min = 0, .max = UINT32_MAX, .flags = FLAGS, },
>
> Why are these two options instead of one? The HCA decoder also treats it
> as 64bit value.

I copied these options from libavformat/hca.c, and I'm not sure why that file
splits it, but I assume it would be best to keep the options the same across
both demuxers.  And since hca.c works I figured it's best not to try to fix
it.

I'm open to any suggestions on the matter.

Regards,
Pavel Roslyy


More information about the ffmpeg-devel mailing list