胡斌

fix bug: invalid data of audio file maybe used to get the max width and height of input video

... ... @@ -685,22 +685,27 @@ void add_media_infos()
printf("\nsorted file info:");
it = sorted_media_with_end.begin();
for (; it != sorted_media_with_end.end();it++){
printf("\n%2d %8.3f %s %4d %4d %3d %s", it->sorted_index, it->type_time, it->name.c_str(), it->width, it->height, it->rotate, it->t_type == tt_start ? "start" : "end");
if (it->width > it->height) {
if (width < it->width) {
width = it->width;
if (it->m_type == mt_video) {
printf("\n%2d %8.3f %s %s %4d %4d %3d", it->sorted_index, it->type_time, it->name.c_str(), it->t_type == tt_start ? "start" : "end", it->width, it->height, it->rotate);
if (it->width > it->height) {
if (width < it->width) {
width = it->width;
}
if (height < it->height) {
height = it->height;
}
}
if (height < it->height) {
height = it->height;
else {//set the image to landscape
if (width < it->height) {
width = it->height;
}
if (height < it->width) {
height = it->width;
}
}
}
else {//set the image to landscape
if (width < it->height) {
width = it->height;
}
if (height < it->width) {
height = it->width;
}
else {
printf("\n%2d %8.3f %s %s", it->sorted_index, it->type_time, it->name.c_str(), it->t_type == tt_start ? "start" : "end");
}
}
printf("\n-------------------------\n");
... ...