--- Not quite sure if the messages are alright. libavcodec/qdm2.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-)
diff --git a/libavcodec/qdm2.c b/libavcodec/qdm2.c index ca39c73..84e28a5 100644 --- a/libavcodec/qdm2.c +++ b/libavcodec/qdm2.c @@ -70,12 +70,6 @@ do { \ #define SB_DITHERING_NOISE(sb,noise_idx) (noise_table[(noise_idx)++] * sb_noise_attenuation[(sb)]) -#define SAMPLES_NEEDED \ - av_log (NULL,AV_LOG_INFO,"This file triggers some untested code. Please contact the developers.\n"); - -#define SAMPLES_NEEDED_2(why) \ - av_log (NULL,AV_LOG_INFO,"This file triggers some missing code. Please contact the developers.\nPosition: %s\n",why); - #define QDM2_MAX_FRAME_SIZE 512 typedef int8_t sb_int8_array[2][30][64]; @@ -568,7 +562,7 @@ static int fix_coding_method_array(int sb, int channels, if (j + k < 128) { if (coding_method[ch][sb + (j + k) / 64][(j + k) % 64] > coding_method[ch][sb][j]) { if (k > 0) { - SAMPLES_NEEDED + avpriv_request_sample(NULL, "This file triggers some untested code. Please contact the developers.\n"); //not debugged, almost never used memset(&coding_method[ch][sb][j + k], case_val, k *sizeof(int8_t)); @@ -694,7 +688,7 @@ static void fill_coding_method_array(sb_int8_array tone_level_idx, if (!superblocktype_2_3) { /* This case is untested, no samples available */ - SAMPLES_NEEDED + avpriv_request_sample(NULL, "This file triggers some untested code. Please contact the developers.\n"); for (ch = 0; ch < nb_channels; ch++) for (sb = 0; sb < 30; sb++) { for (j = 1; j < 63; j++) { // The loop only iterates to 63 so the code doesn't overflow the buffer @@ -1292,7 +1286,7 @@ static void qdm2_decode_super_block(QDM2Context *q) int j; if (i >= FF_ARRAY_ELEMS(q->sub_packet_list_A)) { - SAMPLES_NEEDED_2("too many packet bytes"); + avpriv_request_sample(NULL, "This file triggers some untested code. Please contact the developers.\nPosition: too many packet bytes\n"); return; } @@ -1331,7 +1325,7 @@ static void qdm2_decode_super_block(QDM2Context *q) /* add subpacket to related list */ if (packet->type == 8) { - SAMPLES_NEEDED_2("packet type 8"); + avpriv_request_sample(NULL, "This file triggers some untested code. Please contact the developers.\nPosition: packet type 8\n"); return; } else if (packet->type >= 9 && packet->type <= 12) { /* packets for MPEG Audio like Synthesis Filter */ @@ -1343,7 +1337,7 @@ static void qdm2_decode_super_block(QDM2Context *q) for (j = 0; j < 6; j++) q->fft_level_exp[j] = qdm2_get_vlc(&gb, &fft_level_exp_vlc, 0, 2); } else if (packet->type == 15) { - SAMPLES_NEEDED_2("packet type 15") + avpriv_request_sample(NULL, "This file triggers some untested code. Please contact the developers.\nPosition: packet type 15\n"); return; } else if (packet->type >= 16 && packet->type < 48 && !fft_subpackets[packet->type - 16]) { @@ -1943,7 +1937,7 @@ static int qdm2_decode(QDM2Context *q, const uint8_t *in, int16_t *out) qdm2_calculate_fft(q, ch, q->sub_packet); if (!q->has_errors && q->sub_packet_list_C[0].packet) { - SAMPLES_NEEDED_2("has errors, and C list is not empty") + avpriv_request_sample(NULL, "This file triggers some untested code. Please contact the developers.\nPosition: has errors, and C list is not empty\n"); return -1; } } -- 1.8.3.2 _______________________________________________ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel