Restructure av_log_missing_feature message
Some invocations include a verb in the log message, others do not. Yet av_log_missing_feature expects callers to provide a verb. Change the function to include a verb instead and update the callers accordingly. The result is a more natural function API and correct English in the function invocations.
This commit is contained in:
parent
c136a813d7
commit
f75f4194d1
@ -61,7 +61,7 @@ static int aac_adtstoasc_filter(AVBitStreamFilterContext *bsfc,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!hdr.crc_absent && hdr.num_aac_frames > 1) {
|
if (!hdr.crc_absent && hdr.num_aac_frames > 1) {
|
||||||
av_log_missing_feature(avctx, "Multiple RDBs per frame with CRC is", 0);
|
av_log_missing_feature(avctx, "Multiple RDBs per frame with CRC", 0);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -74,7 +74,7 @@ static int aac_adtstoasc_filter(AVBitStreamFilterContext *bsfc,
|
|||||||
if (!hdr.chan_config) {
|
if (!hdr.chan_config) {
|
||||||
init_get_bits(&gb, buf, buf_size * 8);
|
init_get_bits(&gb, buf, buf_size * 8);
|
||||||
if (get_bits(&gb, 3) != 5) {
|
if (get_bits(&gb, 3) != 5) {
|
||||||
av_log_missing_feature(avctx, "PCE based channel configuration, where the PCE is not the first syntax element is", 0);
|
av_log_missing_feature(avctx, "PCE based channel configuration, where the PCE is not the first syntax element", 0);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
init_put_bits(&pb, pce_data, MAX_PCE_SIZE);
|
init_put_bits(&pb, pce_data, MAX_PCE_SIZE);
|
||||||
|
@ -633,7 +633,7 @@ static int decode_ga_specific_config(AACContext *ac, AVCodecContext *avctx,
|
|||||||
int tags = 0;
|
int tags = 0;
|
||||||
|
|
||||||
if (get_bits1(gb)) { // frameLengthFlag
|
if (get_bits1(gb)) { // frameLengthFlag
|
||||||
av_log_missing_feature(avctx, "960/120 MDCT window is", 1);
|
av_log_missing_feature(avctx, "960/120 MDCT window", 1);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2323,7 +2323,7 @@ static int parse_adts_frame_header(AACContext *ac, GetBitContext *gb)
|
|||||||
size = avpriv_aac_parse_header(gb, &hdr_info);
|
size = avpriv_aac_parse_header(gb, &hdr_info);
|
||||||
if (size > 0) {
|
if (size > 0) {
|
||||||
if (hdr_info.num_aac_frames != 1) {
|
if (hdr_info.num_aac_frames != 1) {
|
||||||
av_log_missing_feature(ac->avctx, "More than one AAC RDB per ADTS frame is", 0);
|
av_log_missing_feature(ac->avctx, "More than one AAC RDB per ADTS frame", 0);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
push_output_configuration(ac);
|
push_output_configuration(ac);
|
||||||
@ -2607,8 +2607,8 @@ static int latm_decode_audio_specific_config(struct LATMContext *latmctx,
|
|||||||
asclen = get_bits_left(gb);
|
asclen = get_bits_left(gb);
|
||||||
|
|
||||||
if (config_start_bit % 8) {
|
if (config_start_bit % 8) {
|
||||||
av_log_missing_feature(latmctx->aac_ctx.avctx, "audio specific "
|
av_log_missing_feature(latmctx->aac_ctx.avctx,
|
||||||
"config not byte aligned.\n", 1);
|
"Non-byte-aligned audio-specific config", 1);
|
||||||
return AVERROR_INVALIDDATA;
|
return AVERROR_INVALIDDATA;
|
||||||
}
|
}
|
||||||
if (asclen <= 0)
|
if (asclen <= 0)
|
||||||
@ -2663,7 +2663,7 @@ static int read_stream_mux_config(struct LATMContext *latmctx,
|
|||||||
// numPrograms
|
// numPrograms
|
||||||
if (get_bits(gb, 4)) { // numPrograms
|
if (get_bits(gb, 4)) { // numPrograms
|
||||||
av_log_missing_feature(latmctx->aac_ctx.avctx,
|
av_log_missing_feature(latmctx->aac_ctx.avctx,
|
||||||
"multiple programs are not supported\n", 1);
|
"multiple programs", 1);
|
||||||
return AVERROR_PATCHWELCOME;
|
return AVERROR_PATCHWELCOME;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2672,7 +2672,7 @@ static int read_stream_mux_config(struct LATMContext *latmctx,
|
|||||||
// for each layer (which there is only on in DVB)
|
// for each layer (which there is only on in DVB)
|
||||||
if (get_bits(gb, 3)) { // numLayer
|
if (get_bits(gb, 3)) { // numLayer
|
||||||
av_log_missing_feature(latmctx->aac_ctx.avctx,
|
av_log_missing_feature(latmctx->aac_ctx.avctx,
|
||||||
"multiple layers are not supported\n", 1);
|
"multiple layers", 1);
|
||||||
return AVERROR_PATCHWELCOME;
|
return AVERROR_PATCHWELCOME;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1065,7 +1065,7 @@ static int decode_seq_header(AVSContext *h) {
|
|||||||
width = get_bits(&s->gb, 14);
|
width = get_bits(&s->gb, 14);
|
||||||
height = get_bits(&s->gb, 14);
|
height = get_bits(&s->gb, 14);
|
||||||
if ((s->width || s->height) && (s->width != width || s->height != height)) {
|
if ((s->width || s->height) && (s->width != width || s->height != height)) {
|
||||||
av_log_missing_feature(s, "Width/height changing in CAVS is", 0);
|
av_log_missing_feature(s, "Width/height changing in CAVS", 0);
|
||||||
return AVERROR_PATCHWELCOME;
|
return AVERROR_PATCHWELCOME;
|
||||||
}
|
}
|
||||||
s->width = width;
|
s->width = width;
|
||||||
|
@ -2462,7 +2462,7 @@ static int decode_slice_header(H264Context *h, H264Context *h0)
|
|||||||
av_cmp_q(h->sps.sar, s->avctx->sample_aspect_ratio))) {
|
av_cmp_q(h->sps.sar, s->avctx->sample_aspect_ratio))) {
|
||||||
if (h != h0 || (HAVE_THREADS && h->s.avctx->active_thread_type & FF_THREAD_FRAME)) {
|
if (h != h0 || (HAVE_THREADS && h->s.avctx->active_thread_type & FF_THREAD_FRAME)) {
|
||||||
av_log_missing_feature(s->avctx,
|
av_log_missing_feature(s->avctx,
|
||||||
"Width/height changing with threads is", 0);
|
"Width/height changing with threads", 0);
|
||||||
return AVERROR_PATCHWELCOME; // width / height changed during parallelized decoding
|
return AVERROR_PATCHWELCOME; // width / height changed during parallelized decoding
|
||||||
}
|
}
|
||||||
free_tables(h, 0);
|
free_tables(h, 0);
|
||||||
|
@ -244,8 +244,8 @@ int ff_mjpeg_decode_sof(MJpegDecodeContext *s)
|
|||||||
return -1;
|
return -1;
|
||||||
if (s->ls && !(s->bits <= 8 || nb_components == 1)) {
|
if (s->ls && !(s->bits <= 8 || nb_components == 1)) {
|
||||||
av_log_missing_feature(s->avctx,
|
av_log_missing_feature(s->avctx,
|
||||||
"only <= 8 bits/component or "
|
"For JPEG-LS anything except <= 8 bits/component"
|
||||||
"16-bit gray accepted for JPEG-LS\n", 0);
|
" or 16-bit gray", 0);
|
||||||
return AVERROR_PATCHWELCOME;
|
return AVERROR_PATCHWELCOME;
|
||||||
}
|
}
|
||||||
s->nb_components = nb_components;
|
s->nb_components = nb_components;
|
||||||
@ -270,8 +270,7 @@ int ff_mjpeg_decode_sof(MJpegDecodeContext *s)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (s->ls && (s->h_max > 1 || s->v_max > 1)) {
|
if (s->ls && (s->h_max > 1 || s->v_max > 1)) {
|
||||||
av_log_missing_feature(s->avctx,
|
av_log_missing_feature(s->avctx, "Subsampling in JPEG-LS", 0);
|
||||||
"Subsampling in JPEG-LS is not supported.\n", 0);
|
|
||||||
return AVERROR_PATCHWELCOME;
|
return AVERROR_PATCHWELCOME;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2028,7 +2028,7 @@ int ff_match_2uint16(const uint16_t(*tab)[2], int size, int a, int b)
|
|||||||
|
|
||||||
void av_log_missing_feature(void *avc, const char *feature, int want_sample)
|
void av_log_missing_feature(void *avc, const char *feature, int want_sample)
|
||||||
{
|
{
|
||||||
av_log(avc, AV_LOG_WARNING, "%s not implemented. Update your Libav "
|
av_log(avc, AV_LOG_WARNING, "%s is not implemented. Update your Libav "
|
||||||
"version to the newest one from Git. If the problem still "
|
"version to the newest one from Git. If the problem still "
|
||||||
"occurs, it means that your file has a feature which has not "
|
"occurs, it means that your file has a feature which has not "
|
||||||
"been implemented.\n", feature);
|
"been implemented.\n", feature);
|
||||||
|
@ -75,8 +75,8 @@ static int skeleton_header(AVFormatContext *s, int idx)
|
|||||||
target_idx = ogg_find_stream(ogg, AV_RL32(buf+12));
|
target_idx = ogg_find_stream(ogg, AV_RL32(buf+12));
|
||||||
start_granule = AV_RL64(buf+36);
|
start_granule = AV_RL64(buf+36);
|
||||||
if (os->start_granule != OGG_NOGRANULE_VALUE) {
|
if (os->start_granule != OGG_NOGRANULE_VALUE) {
|
||||||
av_log_missing_feature(s, "multiple fisbone for the "
|
av_log_missing_feature(s,
|
||||||
"same stream\n", 0);
|
"multiple fisbone for the same stream", 0);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
if (target_idx >= 0 && start_granule != OGG_NOGRANULE_VALUE) {
|
if (target_idx >= 0 && start_granule != OGG_NOGRANULE_VALUE) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user