Commit ec3c9a30 authored by Michael Niedermayer's avatar Michael Niedermayer

ffmpeg: check debug scanf() return value.

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 7d3982bf
...@@ -2575,7 +2575,8 @@ static int transcode(OutputFile *output_files, int nb_output_files, ...@@ -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 while(debug & (FF_DEBUG_DCT_COEFF|FF_DEBUG_VIS_QP|FF_DEBUG_VIS_MB_TYPE)) //unsupported, would just crash
debug += debug; debug += debug;
}else }else
scanf("%d", &debug); if(scanf("%d", &debug)!=1)
fprintf(stderr,"error parsing debug value\n");
for(i=0;i<nb_input_streams;i++) { for(i=0;i<nb_input_streams;i++) {
input_streams[i].st->codec->debug = debug; input_streams[i].st->codec->debug = debug;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment