X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavformat%2Fmov.c;h=efde072c38de9482b699fda088bfa0d0504602fe;hb=9bd305be91fd5f7c3b77998ce7dc53e825ff3a89;hp=92bf2f894099f0e4d50b6184f19852769c372139;hpb=59b009411fcc8531d661a381bbd2608e36c20bd0;p=ffmpeg diff --git a/libavformat/mov.c b/libavformat/mov.c index 92bf2f89409..efde072c38d 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -29,6 +29,7 @@ #include "libavutil/attributes.h" #include "libavutil/channel_layout.h" +#include "libavutil/internal.h" #include "libavutil/intreadwrite.h" #include "libavutil/intfloat.h" #include "libavutil/mathematics.h" @@ -848,9 +849,9 @@ static int mov_read_adrm(MOVContext *c, AVIOContext *pb, MOVAtom atom) av_log(c->fc, AV_LOG_INFO, "\n"); /* verify activation data */ - if (!activation_bytes || c->activation_bytes_size != 4) { - av_log(c->fc, AV_LOG_FATAL, "[aax] activation_bytes option is missing!\n"); - ret = AVERROR(EINVAL); + if (!activation_bytes) { + av_log(c->fc, AV_LOG_WARNING, "[aax] activation_bytes option is missing!\n"); + ret = 0; /* allow ffprobe to continue working on .aax files */ goto fail; } if (c->activation_bytes_size != 4) { @@ -1246,14 +1247,14 @@ static int mov_read_fiel(MOVContext *c, AVIOContext *pb, MOVAtom atom) static int mov_realloc_extradata(AVCodecContext *codec, MOVAtom atom) { int err = 0; - uint64_t size = (uint64_t)codec->extradata_size + atom.size + 8 + FF_INPUT_BUFFER_PADDING_SIZE; + uint64_t size = (uint64_t)codec->extradata_size + atom.size + 8 + AV_INPUT_BUFFER_PADDING_SIZE; if (size > INT_MAX || (uint64_t)atom.size > INT_MAX) return AVERROR_INVALIDDATA; if ((err = av_reallocp(&codec->extradata, size)) < 0) { codec->extradata_size = 0; return err; } - codec->extradata_size = size - FF_INPUT_BUFFER_PADDING_SIZE; + codec->extradata_size = size - AV_INPUT_BUFFER_PADDING_SIZE; return 0; } @@ -1275,7 +1276,7 @@ static int64_t mov_read_atom_into_extradata(MOVContext *c, AVIOContext *pb, MOVA codec->extradata_size -= atom.size - err; result = err; } - memset(buf + 8 + err, 0, FF_INPUT_BUFFER_PADDING_SIZE); + memset(buf + 8 + err, 0, AV_INPUT_BUFFER_PADDING_SIZE); return result; } @@ -1393,7 +1394,7 @@ static int mov_read_aclr(MOVContext *c, AVIOContext *pb, MOVAtom atom) av_log(c, AV_LOG_WARNING, "ignored unknown aclr value (%d)\n", range_value); break; } - av_dlog(c, "color_range: %d\n", codec->color_range); + ff_dlog(c, "color_range: %d\n", codec->color_range); } else { /* For some reason the whole atom was not added to the extradata */ av_log(c, AV_LOG_ERROR, "aclr not decoded - incomplete atom\n"); @@ -1899,7 +1900,7 @@ static int mov_rewrite_dvd_sub_extradata(AVStream *st) av_freep(&st->codec->extradata); st->codec->extradata_size = 0; - st->codec->extradata = av_mallocz(strlen(buf) + FF_INPUT_BUFFER_PADDING_SIZE); + st->codec->extradata = av_mallocz(strlen(buf) + AV_INPUT_BUFFER_PADDING_SIZE); if (!st->codec->extradata) return AVERROR(ENOMEM); st->codec->extradata_size = strlen(buf); @@ -1927,7 +1928,7 @@ static int mov_parse_stsd_data(MOVContext *c, AVIOContext *pb, val = AV_RB32(st->codec->extradata + 4); tmcd_ctx->tmcd_flags = val; if (val & 1) - st->codec->flags2 |= CODEC_FLAG2_DROP_FRAME_TIMECODE; + st->codec->flags2 |= AV_CODEC_FLAG2_DROP_FRAME_TIMECODE; st->codec->time_base.den = st->codec->extradata[16]; /* number of frame */ st->codec->time_base.num = 1; /* adjust for per frame dur in counter mode */ @@ -2336,7 +2337,7 @@ static int mov_read_stsz(MOVContext *c, AVIOContext *pb, MOVAtom atom) num_bytes = (entries*field_size+4)>>3; - buf = av_malloc(num_bytes+FF_INPUT_BUFFER_PADDING_SIZE); + buf = av_malloc(num_bytes+AV_INPUT_BUFFER_PADDING_SIZE); if (!buf) { av_freep(&sc->sample_sizes); return AVERROR(ENOMEM); @@ -4689,17 +4690,17 @@ static int mov_read_seek(AVFormatContext *s, int stream_index, int64_t sample_ti static const AVOption mov_options[] = { {"use_absolute_path", "allow using absolute path when opening alias, this is a possible security issue", - OFFSET(use_absolute_path), FF_OPT_TYPE_INT, {.i64 = 0}, + OFFSET(use_absolute_path), AV_OPT_TYPE_INT, {.i64 = 0}, 0, 1, FLAGS}, {"seek_streams_individually", "Seek each stream individually to the to the closest point", OFFSET(seek_individually), AV_OPT_TYPE_INT, { .i64 = 1 }, 0, 1, FLAGS}, - {"ignore_editlist", "", OFFSET(ignore_editlist), FF_OPT_TYPE_INT, {.i64 = 0}, + {"ignore_editlist", "", OFFSET(ignore_editlist), AV_OPT_TYPE_INT, {.i64 = 0}, 0, 1, FLAGS}, {"use_mfra_for", "use mfra for fragment timestamps", - OFFSET(use_mfra_for), FF_OPT_TYPE_INT, {.i64 = FF_MOV_FLAG_MFRA_AUTO}, + OFFSET(use_mfra_for), AV_OPT_TYPE_INT, {.i64 = FF_MOV_FLAG_MFRA_AUTO}, -1, FF_MOV_FLAG_MFRA_PTS, FLAGS, "use_mfra_for"}, {"auto", "auto", 0, AV_OPT_TYPE_CONST, {.i64 = FF_MOV_FLAG_MFRA_AUTO}, 0, 0,