[FFmpeg-devel] [PATCH 2/3] avformat/mov: Fix parsing of saio/siaz atoms in encrypted content.
James Almer
jamrial at gmail.com
Fri Jan 5 23:46:41 EET 2018
On 1/5/2018 6:29 PM, Jacob Trimble wrote:
> diff --git a/libavformat/mov.c b/libavformat/mov.c
> index eb3fb71e2a..9ff4a809b7 100644
> --- a/libavformat/mov.c
> +++ b/libavformat/mov.c
> @@ -5835,6 +5835,177 @@ static int mov_read_senc(MOVContext *c, AVIOContext *pb, MOVAtom atom)
> return 0;
> }
>
> +static int mov_parse_auxiliary_info(MOVContext *c, MOVStreamContext *sc, AVIOContext *pb, MOVEncryptionIndex *encryption_index)
> +{
> + AVEncryptionInfo **sample;
> + int64_t prev_pos;
> + size_t sample_count, sample_info_size, i;
> + int ret = 0;
> +
> + if (encryption_index->nb_encrypted_samples)
> + return 0;
> + sample_count = encryption_index->auxiliary_info_sample_count;
> + if (encryption_index->auxiliary_offsets_count != 1) {
> + av_log(c->fc, AV_LOG_ERROR, "Multiple auxiliary info chunks are not supported\n");
> + return AVERROR_PATCHWELCOME;
> + }
> +
> + encryption_index->encrypted_samples = av_mallocz_array(sizeof(AVEncryptionInfo*), sample_count);
Number of elements should be the first argument, and size of each
element the second argument.
More information about the ffmpeg-devel
mailing list