History

ffmpeg: ffmpeg: fix reading commands from the keyboard

Michael Niedermayer committed 15 years ago

Commit 7c3f4fb1 parent e3125431 file · +2 −2Browse files

Unified · Split

ffmpeg.c+2−2
@@ -2328,8 +2328,8 @@ static int transcode(OutputFile *output_files, · 2327 unmodified lines
2328 int k;2328 int k;
2329 fprintf(stderr, "\nEnter command: <target> <time> <command>[ <argument>]\n");2329 fprintf(stderr, "\nEnter command: <target> <time> <command>[ <argument>]\n");
2330 i=0;2330 i=0;
2331 while((k=read_key()) > 0 && k!='\n' && k!='\r' && i<sizeof(ret)-1)2331 while((k=read_key()) !='\n' && k!='\r' && i<sizeof(ret)-1)
2332 ret[i++]= k;2332 if(k>0) ret[i++]= k;
2333 ret[i]= 0;2333 ret[i]= 0;
2334 if(k>0 && sscanf(ret, "%63[^ ] %lf %255[^ ] %255[^\n]", target, &ts, cmd, arg) >= 3){2334 if(k>0 && sscanf(ret, "%63[^ ] %lf %255[^ ] %255[^\n]", target, &ts, cmd, arg) >= 3){
2335 for(i=0;i<nb_output_streams;i++) {2335 for(i=0;i<nb_output_streams;i++) {

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