diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-11-11 04:05:25 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-11-11 04:05:25 +0100 |
commit | ec3c9a30203b1313683a473b3fa0fe9ceab57421 (patch) | |
tree | 01f8c5c3deb2a22ff5c1be10372e1a9de6228a62 /ffmpeg.c | |
parent | 7d3982bf42c281e79fd3a1a03055c3000b3b0988 (diff) | |
download | ffmpeg-ec3c9a30203b1313683a473b3fa0fe9ceab57421.tar.gz |
ffmpeg: check debug scanf() return value.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'ffmpeg.c')
-rw-r--r-- | ffmpeg.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -2575,7 +2575,8 @@ static int transcode(OutputFile *output_files, int nb_output_files, while(debug & (FF_DEBUG_DCT_COEFF|FF_DEBUG_VIS_QP|FF_DEBUG_VIS_MB_TYPE)) //unsupported, would just crash debug += debug; }else - scanf("%d", &debug); + if(scanf("%d", &debug)!=1) + fprintf(stderr,"error parsing debug value\n"); for(i=0;i<nb_input_streams;i++) { input_streams[i].st->codec->debug = debug; } |