#undef time //needed because HAVE_AV_CONFIG_H is defined on top
#include <time.h>
-#include "version.h"
#include "cmdutils.h"
#undef NDEBUG
#undef exit
const char program_name[] = "FFmpeg";
-static const int program_birth_year = 2000;
+const int program_birth_year = 2000;
/* select an input stream for an output stream */
typedef struct AVStreamMap {
ost->padright = frame_padright;
if (!ost->video_resample) {
avcodec_get_frame_defaults(&ost->pict_tmp);
- if( avpicture_alloc( (AVPicture*)&ost->pict_tmp, codec->pix_fmt,
- codec->width, codec->height ) )
+ if(avpicture_alloc((AVPicture*)&ost->pict_tmp, codec->pix_fmt,
+ codec->width, codec->height))
goto fail;
}
}
if (ost->video_resample) {
avcodec_get_frame_defaults(&ost->pict_tmp);
- if( avpicture_alloc( (AVPicture*)&ost->pict_tmp, codec->pix_fmt,
- codec->width, codec->height ) ) {
+ if(avpicture_alloc((AVPicture*)&ost->pict_tmp, codec->pix_fmt,
+ codec->width, codec->height)) {
fprintf(stderr, "Cannot allocate temp picture, check pix fmt\n");
av_exit(1);
}
int out_file_index = meta_data_maps[i].out_file;
int in_file_index = meta_data_maps[i].in_file;
- if ( out_file_index < 0 || out_file_index >= nb_output_files ) {
+ if (out_file_index < 0 || out_file_index >= nb_output_files) {
fprintf(stderr, "Invalid output file index %d map_meta_data(%d,%d)\n", out_file_index, out_file_index, in_file_index);
ret = AVERROR(EINVAL);
goto fail;
}
- if ( in_file_index < 0 || in_file_index >= nb_input_files ) {
+ if (in_file_index < 0 || in_file_index >= nb_input_files) {
fprintf(stderr, "Invalid input file index %d map_meta_data(%d,%d)\n", in_file_index, out_file_index, in_file_index);
ret = AVERROR(EINVAL);
goto fail;
print_sdp(output_files, nb_output_files);
}
- if ( !using_stdin && verbose >= 0) {
+ if (!using_stdin && verbose >= 0) {
fprintf(stderr, "Press [q] to stop encoding\n");
url_set_interrupt_cb(decode_interrupt_cb);
}
filename = "pipe:";
using_stdin |= !strncmp(filename, "pipe:", 5) ||
- !strcmp( filename, "/dev/stdin" );
+ !strcmp(filename, "/dev/stdin");
/* get default parameters from command line */
ic = av_alloc_format_context();
if (url_exist(filename)) {
int c;
- if ( !using_stdin ) {
+ if (!using_stdin) {
fprintf(stderr,"File '%s' already exists. Overwrite ? [y/N] ", filename);
fflush(stderr);
c = getchar();
fprintf(stderr, "Not overwriting - exiting\n");
av_exit(1);
}
- }
- else {
+ }
+ else {
fprintf(stderr,"File '%s' already exists. Exiting.\n", filename);
av_exit(1);
- }
+ }
}
}
{ "muxdelay", OPT_FLOAT | HAS_ARG | OPT_EXPERT, {(void*)&mux_max_delay}, "set the maximum demux-decode delay", "seconds" },
{ "muxpreload", OPT_FLOAT | HAS_ARG | OPT_EXPERT, {(void*)&mux_preload}, "set the initial demux-decode delay", "seconds" },
- { "absf", OPT_FUNC2 | HAS_ARG | OPT_AUDIO | OPT_EXPERT, {(void*)opt_bsf}, "", "bitstream filter" },
- { "vbsf", OPT_FUNC2 | HAS_ARG | OPT_VIDEO | OPT_EXPERT, {(void*)opt_bsf}, "", "bitstream filter" },
- { "sbsf", OPT_FUNC2 | HAS_ARG | OPT_SUBTITLE | OPT_EXPERT, {(void*)opt_bsf}, "", "bitstream filter" },
+ { "absf", OPT_FUNC2 | HAS_ARG | OPT_AUDIO | OPT_EXPERT, {(void*)opt_bsf}, "", "bitstream_filter" },
+ { "vbsf", OPT_FUNC2 | HAS_ARG | OPT_VIDEO | OPT_EXPERT, {(void*)opt_bsf}, "", "bitstream_filter" },
+ { "sbsf", OPT_FUNC2 | HAS_ARG | OPT_SUBTITLE | OPT_EXPERT, {(void*)opt_bsf}, "", "bitstream_filter" },
{ "default", OPT_FUNC2 | HAS_ARG | OPT_AUDIO | OPT_VIDEO | OPT_EXPERT, {(void*)opt_default}, "generic catch all option", "" },
{ NULL, },
avformat_opts = av_alloc_format_context();
sws_opts = sws_getContext(16,16,0, 16,16,0, sws_flags, NULL,NULL,NULL);
- show_banner(program_name, program_birth_year);
+ show_banner();
if (argc <= 1) {
show_help();
av_exit(1);