diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-08-30 21:56:40 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-08-30 21:56:40 +0200 |
commit | 7c3f4fb42df4cbe789a9116aff1d34e7657cd33f (patch) | |
tree | dca6463c74d26cb05a9317c824f46e0193c55c89 /ffmpeg.c | |
parent | e312543c82b493422911213ab792cb94f3a9e5b4 (diff) | |
download | ffmpeg-7c3f4fb42df4cbe789a9116aff1d34e7657cd33f.tar.gz |
ffmpeg: ffmpeg: fix reading commands from the keyboard
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'ffmpeg.c')
-rw-r--r-- | ffmpeg.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -2328,8 +2328,8 @@ static int transcode(OutputFile *output_files, int k; fprintf(stderr, "\nEnter command: <target> <time> <command>[ <argument>]\n"); i=0; - while((k=read_key()) > 0 && k!='\n' && k!='\r' && i<sizeof(ret)-1) - ret[i++]= k; + while((k=read_key()) !='\n' && k!='\r' && i<sizeof(ret)-1) + if(k>0) ret[i++]= k; ret[i]= 0; if(k>0 && sscanf(ret, "%63[^ ] %lf %255[^ ] %255[^\n]", target, &ts, cmd, arg) >= 3){ for(i=0;i<nb_output_streams;i++) { |