diff --git a/libavformat/codecstring.c b/libavformat/codecstring.c index b0ccb93e8d..6ecec13ed5 100644 --- a/libavformat/codecstring.c +++ b/libavformat/codecstring.c @@ -180,7 +180,7 @@ int ff_make_codec_str(void *logctx, const AVCodecParameters *par, int err; if (!par->extradata_size) return AVERROR(EINVAL); - if ((err = ff_lcvec_parse_config_record(&lvcc, par->extradata, par->extradata_size)) < 0) + if ((err = ff_lcvec_parse_config_record(&lvcc, par->extradata, par->extradata_size, logctx)) < 0) return err; av_bprintf(out, "lvc1.vprf%u.vlev%u", lvcc.profile_idc, lvcc.level_idc); } else if (par->codec_id == AV_CODEC_ID_AV1) { diff --git a/libavformat/lcevc.c b/libavformat/lcevc.c index 85ea96d22e..423b90a72b 100644 --- a/libavformat/lcevc.c +++ b/libavformat/lcevc.c @@ -178,7 +178,7 @@ static int write_nalu(LCEVCDecoderConfigurationRecord *lvcc, AVIOContext *pb, } int ff_lcvec_parse_config_record(LCEVCDecoderConfigurationRecord *lvcc, - const uint8_t *buf, int size) + const uint8_t *buf, int size, void *logctx) { H2645Packet h2645_pkt = { 0 }; AVIOContext *pb; @@ -217,7 +217,7 @@ int ff_lcvec_parse_config_record(LCEVCDecoderConfigurationRecord *lvcc, if (ret < 0) return ret; - ret = ff_h2645_packet_split(&h2645_pkt, buf, size, NULL, 0, AV_CODEC_ID_LCEVC, 0); + ret = ff_h2645_packet_split(&h2645_pkt, buf, size, logctx, 0, AV_CODEC_ID_LCEVC, 0); if (ret < 0) goto fail; @@ -248,7 +248,7 @@ fail: return ret; } -int ff_isom_write_lvcc(AVIOContext *pb, const uint8_t *data, int len) +int ff_isom_write_lvcc(AVIOContext *pb, const uint8_t *data, int len, void *logctx) { LCEVCDecoderConfigurationRecord lvcc = { 0 }; AVIOContext *idr_pb = NULL, *nidr_pb = NULL; @@ -267,7 +267,7 @@ int ff_isom_write_lvcc(AVIOContext *pb, const uint8_t *data, int len) return 0; } - ret = ff_h2645_packet_split(&h2645_pkt, data, len, NULL, 0, AV_CODEC_ID_LCEVC, 0); + ret = ff_h2645_packet_split(&h2645_pkt, data, len, logctx, 0, AV_CODEC_ID_LCEVC, 0); if (ret < 0) return ret; diff --git a/libavformat/lcevc.h b/libavformat/lcevc.h index 9bbc0c6764..4451bcc058 100644 --- a/libavformat/lcevc.h +++ b/libavformat/lcevc.h @@ -34,9 +34,9 @@ typedef struct LCEVCDecoderConfigurationRecord { uint32_t pic_height_in_luma_samples; } LCEVCDecoderConfigurationRecord; -int ff_isom_write_lvcc(AVIOContext *pb, const uint8_t *data, int len); +int ff_isom_write_lvcc(AVIOContext *pb, const uint8_t *data, int len, void *logctx); int ff_lcvec_parse_config_record(LCEVCDecoderConfigurationRecord *lvcc, - const uint8_t *buf, int size); + const uint8_t *buf, int size, void *logctx); #endif /* AVFORMAT_LCEVC_H */ diff --git a/libavformat/movenc.c b/libavformat/movenc.c index 07d500602b..2a3226c70f 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -1709,7 +1709,7 @@ static int mov_write_evcc_tag(AVIOContext *pb, MOVTrack *track) return update_size(pb, pos); } -static int mov_write_lvcc_tag(AVIOContext *pb, MOVTrack *track) +static int mov_write_lvcc_tag(AVFormatContext *s, AVIOContext *pb, MOVTrack *track) { int64_t pos = avio_tell(pb); @@ -1717,7 +1717,7 @@ static int mov_write_lvcc_tag(AVIOContext *pb, MOVTrack *track) ffio_wfourcc(pb, "lvcC"); ff_isom_write_lvcc(pb, track->extradata[track->last_stsd_index], - track->extradata_size[track->last_stsd_index]); + track->extradata_size[track->last_stsd_index], s); return update_size(pb, pos); } @@ -2924,7 +2924,7 @@ static int mov_write_video_tag(AVFormatContext *s, AVIOContext *pb, MOVMuxContex else if (track->par->codec_id ==AV_CODEC_ID_EVC) { mov_write_evcc_tag(pb, track); } else if (track->par->codec_id == AV_CODEC_ID_LCEVC) { - mov_write_lvcc_tag(pb, track); + mov_write_lvcc_tag(mov->fc, pb, track); } else if (track->par->codec_id ==AV_CODEC_ID_APV) { mov_write_apvc_tag(mov->fc, pb, track); } else if (track->par->codec_id == AV_CODEC_ID_VP9) {