Revision 70fb031c libavcodec/cook.c
libavcodec/cook.c | ||
---|---|---|
1136 | 1136 |
switch (q->subpacket[s].cookversion) { |
1137 | 1137 |
case MONO: |
1138 | 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 | 1140 |
return -1; |
1141 | 1141 |
} |
1142 | 1142 |
av_log(avctx,AV_LOG_DEBUG,"MONO\n"); |
... | ... | |
1150 | 1150 |
break; |
1151 | 1151 |
case JOINT_STEREO: |
1152 | 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 | 1154 |
return -1; |
1155 | 1155 |
} |
1156 | 1156 |
av_log(avctx,AV_LOG_DEBUG,"JOINT_STEREO\n"); |
... | ... | |
1188 | 1188 |
|
1189 | 1189 |
break; |
1190 | 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 | 1192 |
return -1; |
1193 | 1193 |
break; |
1194 | 1194 |
} |
... | ... | |
1205 | 1205 |
|
1206 | 1206 |
/* Try to catch some obviously faulty streams, othervise it might be exploitable */ |
1207 | 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 | 1209 |
return -1; |
1210 | 1210 |
} |
1211 | 1211 |
|
... | ... | |
1215 | 1215 |
} |
1216 | 1216 |
|
1217 | 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 | 1219 |
return -1; |
1220 | 1220 |
} |
1221 | 1221 |
q->subpacket[s].gains1.now = q->subpacket[s].gain_1; |
... | ... | |
1226 | 1226 |
q->num_subpackets++; |
1227 | 1227 |
s++; |
1228 | 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 | 1230 |
return -1; |
1231 | 1231 |
} |
1232 | 1232 |
} |
Also available in: Unified diff