Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Hoffman <mmhoffm@gmail.com>2007-09-05 19:00:00 +0400
committerMarc Hoffman <mmhoffm@gmail.com>2007-09-05 19:00:00 +0400
commite146ce521f03b1cd472a61880a9438f55369d9d4 (patch)
tree1717682b1bddd1f43a1b5f54b9425e308496d5d2 /ffmpeg.c
parentcc5297e871f2a30b62b972c6479ab1d4fdc14132 (diff)
using isnan instead of d==d, to signal correctly parsed option
Originally committed as revision 10406 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index 711a18f4f5..6f202be3ed 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -2567,7 +2567,7 @@ static void opt_input_file(const char *filename)
for(i=0; i<opt_name_count; i++){
const AVOption *opt;
double d= av_get_double(avformat_opts, opt_names[i], &opt);
- if(d==d && (opt->flags&AV_OPT_FLAG_DECODING_PARAM))
+ if(!isnan(d) && (opt->flags&AV_OPT_FLAG_DECODING_PARAM))
av_set_double(ic, opt_names[i], d);
}
/* open the input file with generic libav function */
@@ -2615,7 +2615,7 @@ static void opt_input_file(const char *filename)
for(j=0; j<opt_name_count; j++){
const AVOption *opt;
double d= av_get_double(avctx_opts[CODEC_TYPE_AUDIO], opt_names[j], &opt);
- if(d==d && (opt->flags&AV_OPT_FLAG_AUDIO_PARAM) && (opt->flags&AV_OPT_FLAG_DECODING_PARAM))
+ if(!isnan(d) && (opt->flags&AV_OPT_FLAG_AUDIO_PARAM) && (opt->flags&AV_OPT_FLAG_DECODING_PARAM))
av_set_double(enc, opt_names[j], d);
}
//fprintf(stderr, "\nInput Audio channels: %d", enc->channels);
@@ -2628,7 +2628,7 @@ static void opt_input_file(const char *filename)
for(j=0; j<opt_name_count; j++){
const AVOption *opt;
double d= av_get_double(avctx_opts[CODEC_TYPE_VIDEO], opt_names[j], &opt);
- if(d==d && (opt->flags&AV_OPT_FLAG_VIDEO_PARAM) && (opt->flags&AV_OPT_FLAG_DECODING_PARAM))
+ if(!isnan(d) && (opt->flags&AV_OPT_FLAG_VIDEO_PARAM) && (opt->flags&AV_OPT_FLAG_DECODING_PARAM))
av_set_double(enc, opt_names[j], d);
}
frame_height = enc->height;
@@ -2774,7 +2774,7 @@ static void new_video_stream(AVFormatContext *oc)
for(i=0; i<opt_name_count; i++){
const AVOption *opt;
double d= av_get_double(avctx_opts[CODEC_TYPE_VIDEO], opt_names[i], &opt);
- if(d==d && (opt->flags&AV_OPT_FLAG_VIDEO_PARAM) && (opt->flags&AV_OPT_FLAG_ENCODING_PARAM))
+ if(!isnan(d) && (opt->flags&AV_OPT_FLAG_VIDEO_PARAM) && (opt->flags&AV_OPT_FLAG_ENCODING_PARAM))
av_set_double(video_enc, opt_names[i], d);
}
@@ -2917,7 +2917,7 @@ static void new_audio_stream(AVFormatContext *oc)
for(i=0; i<opt_name_count; i++){
const AVOption *opt;
double d= av_get_double(avctx_opts[CODEC_TYPE_AUDIO], opt_names[i], &opt);
- if(d==d && (opt->flags&AV_OPT_FLAG_AUDIO_PARAM) && (opt->flags&AV_OPT_FLAG_ENCODING_PARAM))
+ if(!isnan(d) && (opt->flags&AV_OPT_FLAG_AUDIO_PARAM) && (opt->flags&AV_OPT_FLAG_ENCODING_PARAM))
av_set_double(audio_enc, opt_names[i], d);
}
@@ -2967,7 +2967,7 @@ static void new_subtitle_stream(AVFormatContext *oc)
for(i=0; i<opt_name_count; i++){
const AVOption *opt;
double d= av_get_double(avctx_opts[CODEC_TYPE_SUBTITLE], opt_names[i], &opt);
- if(d==d && (opt->flags&AV_OPT_FLAG_SUBTITLE_PARAM) && (opt->flags&AV_OPT_FLAG_ENCODING_PARAM))
+ if(!isnan(d) && (opt->flags&AV_OPT_FLAG_SUBTITLE_PARAM) && (opt->flags&AV_OPT_FLAG_ENCODING_PARAM))
av_set_double(subtitle_enc, opt_names[i], d);
}
subtitle_enc->codec_id = find_codec_or_die(subtitle_codec_name, CODEC_TYPE_SUBTITLE, 1);
@@ -3159,7 +3159,7 @@ static void opt_output_file(const char *filename)
for(i=0; i<opt_name_count; i++){
const AVOption *opt;
double d = av_get_double(avformat_opts, opt_names[i], &opt);
- if(d==d && (opt->flags&AV_OPT_FLAG_ENCODING_PARAM))
+ if(!isnan(d) && (opt->flags&AV_OPT_FLAG_ENCODING_PARAM))
av_set_double(oc, opt_names[i], d);
}