#endif
#undef exit
+#undef printf
+#undef fprintf
const char program_name[] = "FFplay";
const int program_birth_year = 2003;
int audio_hw_buf_size;
/* samples output by the codec. we reserve more space for avsync
compensation */
- DECLARE_ALIGNED(16,uint8_t,audio_buf1[(AVCODEC_MAX_AUDIO_FRAME_SIZE * 3) / 2]);
- DECLARE_ALIGNED(16,uint8_t,audio_buf2[(AVCODEC_MAX_AUDIO_FRAME_SIZE * 3) / 2]);
+ DECLARE_ALIGNED(16,uint8_t,audio_buf1)[(AVCODEC_MAX_AUDIO_FRAME_SIZE * 3) / 2];
+ DECLARE_ALIGNED(16,uint8_t,audio_buf2)[(AVCODEC_MAX_AUDIO_FRAME_SIZE * 3) / 2];
uint8_t *audio_buf;
unsigned int audio_buf_size; /* in bytes */
int audio_buf_index; /* in bytes */
enc->skip_loop_filter= skip_loop_filter;
enc->error_recognition= error_recognition;
enc->error_concealment= error_concealment;
+ avcodec_thread_init(enc, thread_count);
set_context_opts(enc, avcodec_opts[enc->codec_type], 0);
is->audio_src_fmt= SAMPLE_FMT_S16;
}
- if(thread_count>1)
- avcodec_thread_init(enc, thread_count);
- enc->thread_count= thread_count;
ic->streams[stream_index]->discard = AVDISCARD_DEFAULT;
switch(enc->codec_type) {
case CODEC_TYPE_AUDIO:
{ NULL, },
};
-static void show_help(void)
+static void show_usage(void)
{
- printf("usage: ffplay [options] input_file\n"
- "Simple media player\n");
+ printf("Simple media player\n");
+ printf("usage: ffplay [options] input_file\n");
printf("\n");
+}
+
+static void show_help(void)
+{
+ show_usage();
show_help_options(options, "Main options:\n",
OPT_EXPERT, 0);
show_help_options(options, "\nAdvanced options:\n",
parse_options(argc, argv, options, opt_input_file);
if (!input_filename) {
- show_help();
+ show_usage();
fprintf(stderr, "An input file must be specified\n");
+ fprintf(stderr, "Use -h to get full help or, even better, run 'man ffplay'\n");
exit(1);
}