aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-04-23 01:09:43 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-04-23 01:09:43 +0200
commite16665bf72d226b2c87c76a677414b8ef7720d7e (patch)
treeb68414614d4ce2eecee89185f80a30a039899bb2
parent03ac7991286c583c73c8c44c71aeba1265c61cba (diff)
parentd9dee728b8c50fb6dbff3701e1abcb2eac5895b3 (diff)
downloadffmpeg-e16665bf72d226b2c87c76a677414b8ef7720d7e.tar.gz
Merge remote branch 'qatar/master'
* qatar/master: Use av_log_ask_for_sample() to request samples from users. Make av_log_ask_for_sample() accept a variable number of arguments. vqavideo: We no longer need to ask for version 1 samples. aacdec: indentation cosmetics Conflicts: libavcodec/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/aacdec.c19
-rw-r--r--libavcodec/atrac3.c2
-rw-r--r--libavcodec/avcodec.h2
-rw-r--r--libavcodec/cook.c4
-rw-r--r--libavcodec/loco.c2
-rw-r--r--libavcodec/utils.c10
-rw-r--r--libavcodec/vqavideo.c2
-rw-r--r--libavcodec/wnv1.c6
-rw-r--r--libavformat/oma.c3
9 files changed, 29 insertions, 21 deletions
diff --git a/libavcodec/aacdec.c b/libavcodec/aacdec.c
index a0b67f4af7..028e855dda 100644
--- a/libavcodec/aacdec.c
+++ b/libavcodec/aacdec.c
@@ -180,9 +180,8 @@ static ChannelElement *get_che(AACContext *ac, int type, int elem_id)
* @return Returns error status. 0 - OK, !0 - error
*/
static av_cold int che_configure(AACContext *ac,
- enum ChannelPosition che_pos[4][MAX_ELEM_ID],
- int type, int id,
- int *channels)
+ enum ChannelPosition che_pos[4][MAX_ELEM_ID],
+ int type, int id, int *channels)
{
if (che_pos[type][id]) {
if (!ac->che[type][id] && !(ac->che[type][id] = av_mallocz(sizeof(ChannelElement))))
@@ -212,9 +211,9 @@ static av_cold int che_configure(AACContext *ac,
* @return Returns error status. 0 - OK, !0 - error
*/
static av_cold int output_configure(AACContext *ac,
- enum ChannelPosition che_pos[4][MAX_ELEM_ID],
- enum ChannelPosition new_che_pos[4][MAX_ELEM_ID],
- int channel_config, enum OCStatus oc_type)
+ enum ChannelPosition che_pos[4][MAX_ELEM_ID],
+ enum ChannelPosition new_che_pos[4][MAX_ELEM_ID],
+ int channel_config, enum OCStatus oc_type)
{
AVCodecContext *avctx = ac->avctx;
int i, type, channels = 0, ret;
@@ -231,7 +230,7 @@ static av_cold int output_configure(AACContext *ac,
return ret;
}
- memset(ac->tag_che_map, 0, 4 * MAX_ELEM_ID * sizeof(ac->che[0][0]));
+ memset(ac->tag_che_map, 0, 4 * MAX_ELEM_ID * sizeof(ac->che[0][0]));
avctx->channel_layout = aac_channel_layout[channel_config - 1];
} else {
@@ -346,8 +345,8 @@ static int decode_pce(AVCodecContext *avctx, MPEG4AudioConfig *m4ac,
* @return Returns error status. 0 - OK, !0 - error
*/
static av_cold int set_default_channel_config(AVCodecContext *avctx,
- enum ChannelPosition new_che_pos[4][MAX_ELEM_ID],
- int channel_config)
+ enum ChannelPosition new_che_pos[4][MAX_ELEM_ID],
+ int channel_config)
{
if (channel_config < 1 || channel_config > 7) {
av_log(avctx, AV_LOG_ERROR, "invalid default channel configuration (%d)\n",
@@ -1240,7 +1239,7 @@ static av_always_inline float flt16_trunc(float pf)
static av_always_inline void predict(PredictorState *ps, float *coef,
float sf_scale, float inv_sf_scale,
- int output_enable)
+ int output_enable)
{
const float a = 0.953125; // 61.0 / 64
const float alpha = 0.90625; // 29.0 / 32
diff --git a/libavcodec/atrac3.c b/libavcodec/atrac3.c
index 3bf514c8b3..bd49169465 100644
--- a/libavcodec/atrac3.c
+++ b/libavcodec/atrac3.c
@@ -186,7 +186,7 @@ static int decode_bytes(const uint8_t* inbuffer, uint8_t* out, int bytes){
obuf[i] = c ^ buf[i];
if (off)
- av_log(NULL,AV_LOG_DEBUG,"Offset of %d not handled, post sample on ffmpeg-dev.\n",off);
+ av_log_ask_for_sample(NULL, "Offset of %d not handled.\n", off);
return off;
}
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 1919b2cd33..10866a1ee0 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -4172,7 +4172,7 @@ void av_log_missing_feature(void *avc, const char *feature, int want_sample);
* a pointer to an AVClass struct
* @param[in] msg string containing an optional message, or NULL if no message
*/
-void av_log_ask_for_sample(void *avc, const char *msg);
+void av_log_ask_for_sample(void *avc, const char *msg, ...);
/**
* Register the hardware accelerator hwaccel.
diff --git a/libavcodec/cook.c b/libavcodec/cook.c
index 27a45f318b..41a869e7ba 100644
--- a/libavcodec/cook.c
+++ b/libavcodec/cook.c
@@ -1268,7 +1268,9 @@ static av_cold int cook_decode_init(AVCodecContext *avctx)
/* Try to catch some obviously faulty streams, othervise it might be exploitable */
if ((q->samples_per_channel == 256) || (q->samples_per_channel == 512) || (q->samples_per_channel == 1024)) {
} else {
- av_log(avctx,AV_LOG_ERROR,"unknown amount of samples_per_channel = %d, report sample!\n",q->samples_per_channel);
+ av_log_ask_for_sample(avctx,
+ "unknown amount of samples_per_channel = %d\n",
+ q->samples_per_channel);
return -1;
}
diff --git a/libavcodec/loco.c b/libavcodec/loco.c
index 48fa829914..8f2b8ff325 100644
--- a/libavcodec/loco.c
+++ b/libavcodec/loco.c
@@ -248,7 +248,7 @@ static av_cold int decode_init(AVCodecContext *avctx){
break;
default:
l->lossy = AV_RL32(avctx->extradata + 8);
- av_log(avctx, AV_LOG_INFO, "This is LOCO codec version %i, please upload file for study\n", version);
+ av_log_ask_for_sample(avctx, "This is LOCO codec version %i.\n", version);
}
l->mode = AV_RL32(avctx->extradata + 4);
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index ec3f4b965b..d6b71b42db 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -1208,13 +1208,19 @@ void av_log_missing_feature(void *avc, const char *feature, int want_sample)
av_log(avc, AV_LOG_WARNING, "\n");
}
-void av_log_ask_for_sample(void *avc, const char *msg)
+void av_log_ask_for_sample(void *avc, const char *msg, ...)
{
+ va_list argument_list;
+
+ va_start(argument_list, msg);
+
if (msg)
- av_log(avc, AV_LOG_WARNING, "%s ", msg);
+ av_vlog(avc, AV_LOG_WARNING, msg, argument_list);
av_log(avc, AV_LOG_WARNING, "If you want to help, upload a sample "
"of this file to ftp://upload.ffmpeg.org/MPlayer/incoming/ "
"and contact the ffmpeg-devel mailing list.\n");
+
+ va_end(argument_list);
}
static AVHWAccel *first_hwaccel = NULL;
diff --git a/libavcodec/vqavideo.c b/libavcodec/vqavideo.c
index f0ecda6217..109faab4fb 100644
--- a/libavcodec/vqavideo.c
+++ b/libavcodec/vqavideo.c
@@ -464,8 +464,6 @@ static void vqa_decode_chunk(VqaContext *s)
switch (s->vqa_version) {
case 1:
-/* still need sample media for this case (only one game, "Legend of
- * Kyrandia III : Malcolm's Revenge", is known to use this version) */
lobyte = s->decode_buffer[lobytes * 2];
hibyte = s->decode_buffer[(lobytes * 2) + 1];
vector_index = ((hibyte << 8) | lobyte) >> 3;
diff --git a/libavcodec/wnv1.c b/libavcodec/wnv1.c
index 2f96039053..15d90c1a89 100644
--- a/libavcodec/wnv1.c
+++ b/libavcodec/wnv1.c
@@ -96,11 +96,13 @@ static int decode_frame(AVCodecContext *avctx,
else {
l->shift = 8 - (buf[2] >> 4);
if (l->shift > 4) {
- av_log(avctx, AV_LOG_ERROR, "Unknown WNV1 frame header value %i, please upload file for study\n", buf[2] >> 4);
+ av_log_ask_for_sample(avctx, "Unknown WNV1 frame header value %i\n",
+ buf[2] >> 4);
l->shift = 4;
}
if (l->shift < 1) {
- av_log(avctx, AV_LOG_ERROR, "Unknown WNV1 frame header value %i, please upload file for study\n", buf[2] >> 4);
+ av_log_ask_for_sample(avctx, "Unknown WNV1 frame header value %i\n",
+ buf[2] >> 4);
l->shift = 1;
}
}
diff --git a/libavformat/oma.c b/libavformat/oma.c
index 03dc1e9d8b..f29b16a4d6 100644
--- a/libavformat/oma.c
+++ b/libavformat/oma.c
@@ -107,7 +107,8 @@ static int oma_read_header(AVFormatContext *s,
case OMA_CODECID_ATRAC3:
samplerate = srate_tab[(codec_params >> 13) & 7]*100;
if (samplerate != 44100)
- av_log(s, AV_LOG_ERROR, "Unsupported sample rate, send sample file to developers: %d\n", samplerate);
+ av_log_ask_for_sample(s, "Unsupported sample rate: %d\n",
+ samplerate);
framesize = (codec_params & 0x3FF) * 8;
jsflag = (codec_params >> 17) & 1; /* get stereo coding mode, 1 for joint-stereo */