mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2026-08-04 15:10:39 +00:00
avformat/lcevc: add a log context parameter to all functions
Printing to NULL should be avoided when possible. Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user