| @@ -292,12 +292,12 @@ int ff_mp4_read_descr_len(AVIOContext *pb) · 291 unmodified lines |
| 292 | 292 | return len; |
| 293 | 293 | } |
| 294 | 294 | |
| 295 | | −int ff_mp4_read_descr(AVFormatContext *fc, AVIOContext *pb, int *tag) |
| 295 | +int ff_mp4_read_descr(void *logctx, AVIOContext *pb, int *tag) |
| 296 | 296 | { |
| 297 | 297 | int len; |
| 298 | 298 | *tag = avio_r8(pb); |
| 299 | 299 | len = ff_mp4_read_descr_len(pb); |
| 300 | | − av_log(fc, AV_LOG_TRACE, "MPEG-4 description: tag=0x%02x len=%d\n", *tag, len); |
| 300 | + av_log(logctx, AV_LOG_TRACE, "MPEG-4 description: tag=0x%02x len=%d\n", *tag, len); |
| 301 | 301 | return len; |
| 302 | 302 | } |
| 303 | 303 | |
| @@ -326,7 +326,7 @@ static const AVCodecTag mp4_audio_types[] = { · 22 unmodified lines |
| 326 | 326 | { AV_CODEC_ID_NONE, AOT_NULL }, |
| 327 | 327 | }; |
| 328 | 328 | |
| 329 | | −int ff_mp4_read_dec_config_descr(AVFormatContext *fc, AVStream *st, AVIOContext *pb) |
| 329 | +int ff_mp4_read_dec_config_descr(void *logctx, AVStream *st, AVIOContext *pb) |
| 330 | 330 | { |
| 331 | 331 | enum AVCodecID codec_id; |
| 332 | 332 | int len, tag; |
| @@ -341,22 +341,22 @@ int ff_mp4_read_dec_config_descr(AVFormatContext *fc, AVStream *st, AVIOContext · 8 unmodified lines |
| 341 | 341 | codec_id= ff_codec_get_id(ff_mp4_obj_type, object_type_id); |
| 342 | 342 | if (codec_id) |
| 343 | 343 | st->codecpar->codec_id = codec_id; |
| 344 | | − av_log(fc, AV_LOG_TRACE, "esds object type id 0x%02x\n", object_type_id); |
| 345 | | − len = ff_mp4_read_descr(fc, pb, &tag); |
| 344 | + av_log(logctx, AV_LOG_TRACE, "esds object type id 0x%02x\n", object_type_id); |
| 345 | + len = ff_mp4_read_descr(logctx, pb, &tag); |
| 346 | 346 | if (tag == MP4DecSpecificDescrTag) { |
| 347 | | − av_log(fc, AV_LOG_TRACE, "Specific MPEG-4 header len=%d\n", len); |
| 347 | + av_log(logctx, AV_LOG_TRACE, "Specific MPEG-4 header len=%d\n", len); |
| 348 | 348 | /* As per 14496-3:2009 9.D.2.2, No decSpecificInfo is defined |
| 349 | 349 | for MPEG-1 Audio or MPEG-2 Audio; MPEG-2 AAC excluded. */ |
| 350 | 350 | if (object_type_id == 0x69 || object_type_id == 0x6b) |
| 351 | 351 | return 0; |
| 352 | 352 | if (!len || (uint64_t)len > (1<<30)) |
| 353 | 353 | return AVERROR_INVALIDDATA; |
| 354 | | − if ((ret = ff_get_extradata(fc, st->codecpar, pb, len)) < 0) |
| 354 | + if ((ret = ff_get_extradata(logctx, st->codecpar, pb, len)) < 0) |
| 355 | 355 | return ret; |
| 356 | 356 | if (st->codecpar->codec_id == AV_CODEC_ID_AAC) { |
| 357 | 357 | MPEG4AudioConfig cfg = {0}; |
| 358 | 358 | ret = avpriv_mpeg4audio_get_config2(&cfg, st->codecpar->extradata, |
| 359 | | − st->codecpar->extradata_size, 1, fc); |
| 359 | + st->codecpar->extradata_size, 1, logctx); |
| 360 | 360 | if (ret < 0) |
| 361 | 361 | return ret; |
| 362 | 362 | if (cfg.channels != st->codecpar->ch_layout.nb_channels) { |
| @@ -370,7 +370,7 @@ int ff_mp4_read_dec_config_descr(AVFormatContext *fc, AVStream *st, AVIOContext · 7 unmodified lines |
| 370 | 370 | st->codecpar->sample_rate = cfg.ext_sample_rate; |
| 371 | 371 | else |
| 372 | 372 | st->codecpar->sample_rate = cfg.sample_rate; |
| 373 | | − av_log(fc, AV_LOG_TRACE, "mp4a config channels %d obj %d ext obj %d " |
| 373 | + av_log(logctx, AV_LOG_TRACE, "mp4a config channels %d obj %d ext obj %d " |
| 374 | 374 | "sample rate %d ext sample rate %d\n", cfg.channels, |
| 375 | 375 | cfg.object_type, cfg.ext_object_type, |
| 376 | 376 | cfg.sample_rate, cfg.ext_sample_rate); |