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
1136 switch (q->subpacket[s].cookversion) {1136 switch (q->subpacket[s].cookversion) {
1137 case MONO:1137 case MONO:
1138 if (q->nb_channels != 1) {1138 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");
1140 return -1;1140 return -1;
1141 }1141 }
1142 av_log(avctx,AV_LOG_DEBUG,"MONO\n");1142 av_log(avctx,AV_LOG_DEBUG,"MONO\n");
@@ -1150,7 +1150,7 @@ static av_cold int cook_decode_init(AVCodecContext *avctx) · 7 unmodified lines
1150 break;1150 break;
1151 case JOINT_STEREO:1151 case JOINT_STEREO:
1152 if (q->nb_channels != 2) {1152 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");
1154 return -1;1154 return -1;
1155 }1155 }
1156 av_log(avctx,AV_LOG_DEBUG,"JOINT_STEREO\n");1156 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
1188 1188
1189 break;1189 break;
1190 default:1190 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");
1192 return -1;1192 return -1;
1193 break;1193 break;
1194 }1194 }
@@ -1205,7 +1205,7 @@ static av_cold int cook_decode_init(AVCodecContext *avctx) · 10 unmodified lines
1205 1205
1206 /* Try to catch some obviously faulty streams, othervise it might be exploitable */1206 /* Try to catch some obviously faulty streams, othervise it might be exploitable */
1207 if (q->subpacket[s].total_subbands > 53) {1207 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");
1209 return -1;1209 return -1;
1210 }1210 }
1211 1211
@@ -1215,7 +1215,7 @@ static av_cold int cook_decode_init(AVCodecContext *avctx) · 3 unmodified lines
1215 }1215 }
1216 1216
1217 if (q->subpacket[s].subbands > 50) {1217 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");
1219 return -1;1219 return -1;
1220 }1220 }
1221 q->subpacket[s].gains1.now = q->subpacket[s].gain_1;1221 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
1226 q->num_subpackets++;1226 q->num_subpackets++;
1227 s++;1227 s++;
1228 if (s > MAX_SUBPACKETS) {1228 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");
1230 return -1;1230 return -1;
1231 }1231 }
1232 }1232 }
libavcodec/truemotion1.c+2−2
@@ -353,7 +353,7 @@ static int truemotion1_decode_header(TrueMotion1Context *s) · 352 unmodified lines
353 s->flags = FLAG_KEYFRAME;353 s->flags = FLAG_KEYFRAME;
354 354
355 if (s->flags & FLAG_SPRITE) {355 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");
357 /* FIXME header.width, height, xoffset and yoffset aren't initialized */357 /* FIXME header.width, height, xoffset and yoffset aren't initialized */
358#if 0358#if 0
359 s->w = header.width;359 s->w = header.width;
@@ -370,7 +370,7 @@ static int truemotion1_decode_header(TrueMotion1Context *s) · 10 unmodified lines
370 if ((s->w < 213) && (s->h >= 176))370 if ((s->w < 213) && (s->h >= 176))
371 {371 {
372 s->flags |= FLAG_INTERPOLATED;372 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");
374 }374 }
375 }375 }
376 }376 }
libavcodec/tta.c+3−2
@@ -247,7 +247,7 @@ static av_cold int tta_decode_init(AVCodecContext * avctx) · 246 unmodified lines
247 if (s->is_float)247 if (s->is_float)
248 {248 {
249 avctx->sample_fmt = AV_SAMPLE_FMT_FLT;249 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");
251 return -1;251 return -1;
252 }252 }
253 else switch(s->bps) {253 else switch(s->bps) {
@@ -256,7 +256,8 @@ static av_cold int tta_decode_init(AVCodecContext * avctx) · 2 unmodified lines
256// case 3: avctx->sample_fmt = AV_SAMPLE_FMT_S24; break;256// case 3: avctx->sample_fmt = AV_SAMPLE_FMT_S24; break;
257 case 4: avctx->sample_fmt = AV_SAMPLE_FMT_S32; break;257 case 4: avctx->sample_fmt = AV_SAMPLE_FMT_S32; break;
258 default:258 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");
260 return -1;261 return -1;
261 }262 }
262 263
libavcodec/v210x.c+1−1
@@ -52,7 +52,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac · 51 unmodified lines
52 }52 }
53 53
54 if(avpkt->size > avctx->width * avctx->height * 8 / 3){54 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");
56 }56 }
57 57
58 pic->reference= 0;58 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