History

Use av_log_ask_for_sample() where appropriate.

Diego Biurrun committed 15 years ago

Commit 70fb0311 parent 8d672184 files · +12 −11Browse files

Unified · Split

4 files
  1. libavcodec/cook.c +6 −6
  2. libavcodec/truemotion1.c +2 −2
  3. libavcodec/tta.c +3 −2
  4. libavcodec/v210x.c +1 −1
libavcodec/cook.c+6−6
@@ -1136,7 +1136,7 @@ static av_cold int cook_decode_init(AVCodecContext *avctx) · 1135 unmodified lines
11361136 switch (q->subpacket[s].cookversion) {
11371137 case MONO:
11381138 if (q->nb_channels != 1) {
1139− av_log(avctx,AV_LOG_ERROR,"Container channels != 1, report sample!\n");
1139+ av_log_ask_for_sample(avctx, "Container channels != 1.!\n");
11401140 return -1;
11411141 }
11421142 av_log(avctx,AV_LOG_DEBUG,"MONO\n");
@@ -1150,7 +1150,7 @@ static av_cold int cook_decode_init(AVCodecContext *avctx) · 7 unmodified lines
11501150 break;
11511151 case JOINT_STEREO:
11521152 if (q->nb_channels != 2) {
1153− av_log(avctx,AV_LOG_ERROR,"Container channels != 2, report sample!\n");
1153+ av_log_ask_for_sample(avctx, "Container channels != 2.\n");
11541154 return -1;
11551155 }
11561156 av_log(avctx,AV_LOG_DEBUG,"JOINT_STEREO\n");
@@ -1188,7 +1188,7 @@ static av_cold int cook_decode_init(AVCodecContext *avctx) · 31 unmodified lines
11881188
11891189 break;
11901190 default:
1191− av_log(avctx,AV_LOG_ERROR,"Unknown Cook version, report sample!\n");
1191+ av_log_ask_for_sample(avctx, "Unknown Cook version.\n");
11921192 return -1;
11931193 break;
11941194 }
@@ -1205,7 +1205,7 @@ static av_cold int cook_decode_init(AVCodecContext *avctx) · 10 unmodified lines
12051205
12061206 /* Try to catch some obviously faulty streams, othervise it might be exploitable */
12071207 if (q->subpacket[s].total_subbands > 53) {
1208− av_log(avctx,AV_LOG_ERROR,"total_subbands > 53, report sample!\n");
1208+ av_log_ask_for_sample(avctx, "total_subbands > 53\n");
12091209 return -1;
12101210 }
12111211
@@ -1215,7 +1215,7 @@ static av_cold int cook_decode_init(AVCodecContext *avctx) · 3 unmodified lines
12151215 }
12161216
12171217 if (q->subpacket[s].subbands > 50) {
1218− av_log(avctx,AV_LOG_ERROR,"subbands > 50, report sample!\n");
1218+ av_log_ask_for_sample(avctx, "subbands > 50\n");
12191219 return -1;
12201220 }
12211221 q->subpacket[s].gains1.now = q->subpacket[s].gain_1;
@@ -1226,7 +1226,7 @@ static av_cold int cook_decode_init(AVCodecContext *avctx) · 4 unmodified lines
12261226 q->num_subpackets++;
12271227 s++;
12281228 if (s > MAX_SUBPACKETS) {
1229− av_log(avctx,AV_LOG_ERROR,"Too many subpackets > 5, report file!\n");
1229+ av_log_ask_for_sample(avctx, "Too many subpackets > 5\n");
12301230 return -1;
12311231 }
12321232 }
libavcodec/truemotion1.c+2−2
@@ -353,7 +353,7 @@ static int truemotion1_decode_header(TrueMotion1Context *s) · 352 unmodified lines
353353 s->flags = FLAG_KEYFRAME;
354354
355355 if (s->flags & FLAG_SPRITE) {
356− av_log(s->avctx, AV_LOG_INFO, "SPRITE frame found, please report the sample to the developers\n");
356+ av_log_ask_for_sample(s->avctx, "SPRITE frame found.\n");
357357 /* FIXME header.width, height, xoffset and yoffset aren't initialized */
358358 #if 0
359359 s->w = header.width;
@@ -370,7 +370,7 @@ static int truemotion1_decode_header(TrueMotion1Context *s) · 10 unmodified lines
370370 if ((s->w < 213) && (s->h >= 176))
371371 {
372372 s->flags |= FLAG_INTERPOLATED;
373− av_log(s->avctx, AV_LOG_INFO, "INTERPOLATION selected, please report the sample to the developers\n");
373+ av_log_ask_for_sample(s->avctx, "INTERPOLATION selected.\n");
374374 }
375375 }
376376 }
libavcodec/tta.c+3−2
@@ -247,7 +247,7 @@ static av_cold int tta_decode_init(AVCodecContext * avctx) · 246 unmodified lines
247247 if (s->is_float)
248248 {
249249 avctx->sample_fmt = AV_SAMPLE_FMT_FLT;
250− av_log(s->avctx, AV_LOG_ERROR, "Unsupported sample format. Please contact the developers.\n");
250+ av_log_ask_for_sample(s->avctx, "Unsupported sample format.\n");
251251 return -1;
252252 }
253253 else switch(s->bps) {
@@ -256,7 +256,8 @@ static av_cold int tta_decode_init(AVCodecContext * avctx) · 2 unmodified lines
256256 // case 3: avctx->sample_fmt = AV_SAMPLE_FMT_S24; break;
257257 case 4: avctx->sample_fmt = AV_SAMPLE_FMT_S32; break;
258258 default:
259− av_log(s->avctx, AV_LOG_ERROR, "Invalid/unsupported sample format. Please contact the developers.\n");
259+ av_log_ask_for_sample(s->avctx,
260+ "Invalid/unsupported sample format.\n");
260261 return -1;
261262 }
262263
libavcodec/v210x.c+1−1
@@ -52,7 +52,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac · 51 unmodified lines
5252 }
5353
5454 if(avpkt->size > avctx->width * avctx->height * 8 / 3){
55− av_log(avctx, AV_LOG_ERROR, "Probably padded data, need sample!\n");
55+ av_log_ask_for_sample(avctx, "Probably padded data\n");
5656 }
5757
5858 pic->reference= 0;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t