胡斌

improve print info

print and return error if no paramter after "-t"
... ... @@ -25,10 +25,10 @@ int CVideoDecoder::add(media_info &info)
if (_info.size() > 1) {
if (_is_finished == false) {
printf("add file:%s ,but the last file, %s, is not finished?", info.name.c_str(), _info[_info.size() - 2].name.c_str());
printf("\nadd file:%s ,but the last file, %s, is not finished?", info.name.c_str(), _info[_info.size() - 2].name.c_str());
}
else {
printf("add file:%s ,after the last file, %s", info.name.c_str(), _info[_info.size() - 2].name.c_str());
printf("\nadd file:%s ,after the last file, %s", info.name.c_str(), _info[_info.size() - 2].name.c_str());
}
}
... ...
... ... @@ -1086,8 +1086,9 @@ int main(int argc, char * argv[])
for (int i = 2; i < argc; i++){
if (!strcmp(argv[i], "-t")){
i++;
if (i < argc) {
if (i > argc) {
printf("error,should be 0,1 or 2 after -t");
return -2;
}
piptype = atoi(argv[i]);
}
... ...