[FFmpeg-cvslog] ffmpeg: ffmpeg: fix reading commands from the keyboard
Michael Niedermayer
git at videolan.org
Tue Aug 30 23:44:29 CEST 2011
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue Aug 30 21:56:40 2011 +0200| [7c3f4fb42df4cbe789a9116aff1d34e7657cd33f] | committer: Michael Niedermayer
ffmpeg: ffmpeg: fix reading commands from the keyboard
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7c3f4fb42df4cbe789a9116aff1d34e7657cd33f
---
ffmpeg.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/ffmpeg.c b/ffmpeg.c
index 739b866..cf014d2 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -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++) {
More information about the ffmpeg-cvslog
mailing list