#undef NDEBUG
#include <assert.h>
-#if !defined(INFINITY) && defined(HUGE_VAL)
-#define INFINITY HUGE_VAL
-#endif
-
#undef exit
static const char program_name[] = "FFmpeg";
static int pgmyuv_compatibility_hack=0;
static float dts_delta_threshold = 10;
-static int sws_flags = SWS_BICUBIC;
+static unsigned int sws_flags = SWS_BICUBIC;
static const char **opt_names;
static int opt_name_count;
}
static double psnr(double d){
- if(d==0) return INFINITY;
return -10.0*log(d)/log(10.0);
}
av_strlcpy(ost->st->language, ist->st->language,
sizeof(ost->st->language));
+ ost->st->disposition = ist->st->disposition;
+
if (ost->st->stream_copy) {
/* if stream_copy is selected, no need to decode or encode */
codec->codec_id = icodec->codec_id;
m->in_file = strtol(p, &p, 0);
}
-static int64_t parse_time_or_die(const char *timestr, int is_duration)
+static int64_t parse_time_or_die(const char *context, const char *timestr, int is_duration)
{
int64_t us = parse_date(timestr, is_duration);
if (us == INT64_MIN) {
- fprintf(stderr, "Invalid %s specification: %s\n",
- is_duration ? "duration" : "date", timestr);
+ fprintf(stderr, "Invalid %s specification for %s: %s\n",
+ is_duration ? "duration" : "date", context, timestr);
exit(1);
}
return us;
static void opt_recording_time(const char *arg)
{
- recording_time = parse_time_or_die(arg, 1);
+ recording_time = parse_time_or_die("t", arg, 1);
}
static void opt_start_time(const char *arg)
{
- start_time = parse_time_or_die(arg, 1);
+ start_time = parse_time_or_die("ss", arg, 1);
}
static void opt_rec_timestamp(const char *arg)
{
- rec_timestamp = parse_time_or_die(arg, 0) / 1000000;
+ rec_timestamp = parse_time_or_die("timestamp", arg, 0) / 1000000;
}
static void opt_input_ts_offset(const char *arg)
{
- input_ts_offset = parse_time_or_die(arg, 1);
+ input_ts_offset = parse_time_or_die("itsoffset", arg, 1);
}
static enum CodecID find_codec_or_die(const char *name, int type, int encoder)
{ "re", OPT_BOOL | OPT_EXPERT, {(void*)&rate_emu}, "read input at native frame rate", "" },
{ "loop_input", OPT_BOOL | OPT_EXPERT, {(void*)&loop_input}, "loop (current only works with images)" },
{ "loop_output", HAS_ARG | OPT_INT | OPT_EXPERT, {(void*)&loop_output}, "number of times to loop output in formats that support looping (0 loops forever)", "" },
- { "v", HAS_ARG, {(void*)opt_verbose}, "control amount of logging", "verbose" },
+ { "v", HAS_ARG, {(void*)opt_verbose}, "set the logging verbosity level", "number" },
{ "target", HAS_ARG, {(void*)opt_target}, "specify target file type (\"vcd\", \"svcd\", \"dvd\", \"dv\", \"dv50\", \"pal-vcd\", \"ntsc-svcd\", ...)", "type" },
{ "threads", HAS_ARG | OPT_EXPERT, {(void*)opt_thread_count}, "thread count", "count" },
{ "vsync", HAS_ARG | OPT_INT | OPT_EXPERT, {(void*)&video_sync_method}, "video sync method", "" },