static char *afilters = NULL;
#endif
static int autorotate = 1;
+static int find_stream_info = 1;
/* current context */
static int is_full_screen;
int64_t stream_start_time;
int pkt_in_play_range = 0;
AVDictionaryEntry *t;
- AVDictionary **opts;
- int orig_nb_streams;
SDL_mutex *wait_mutex = SDL_CreateMutex();
int scan_all_pmts_set = 0;
int64_t pkt_ts;
av_format_inject_global_side_data(ic);
- opts = setup_find_stream_info_opts(ic, codec_opts);
- orig_nb_streams = ic->nb_streams;
+ if (find_stream_info) {
+ AVDictionary **opts = setup_find_stream_info_opts(ic, codec_opts);
+ int orig_nb_streams = ic->nb_streams;
- err = avformat_find_stream_info(ic, opts);
+ err = avformat_find_stream_info(ic, opts);
- for (i = 0; i < orig_nb_streams; i++)
- av_dict_free(&opts[i]);
- av_freep(&opts);
+ for (i = 0; i < orig_nb_streams; i++)
+ av_dict_free(&opts[i]);
+ av_freep(&opts);
- if (err < 0) {
- av_log(NULL, AV_LOG_WARNING,
- "%s: could not find codec parameters\n", is->filename);
- ret = -1;
- goto fail;
+ if (err < 0) {
+ av_log(NULL, AV_LOG_WARNING,
+ "%s: could not find codec parameters\n", is->filename);
+ ret = -1;
+ goto fail;
+ }
}
if (ic->pb)
static int dummy;
static const OptionDef options[] = {
-#include "cmdutils_common_opts.h"
+ CMDUTILS_COMMON_OPTIONS
{ "x", HAS_ARG, { .func_arg = opt_width }, "force displayed width", "width" },
{ "y", HAS_ARG, { .func_arg = opt_height }, "force displayed height", "height" },
{ "s", HAS_ARG | OPT_VIDEO, { .func_arg = opt_frame_size }, "set frame size (WxH or abbreviation)", "size" },
{ "scodec", HAS_ARG | OPT_STRING | OPT_EXPERT, { &subtitle_codec_name }, "force subtitle decoder", "decoder_name" },
{ "vcodec", HAS_ARG | OPT_STRING | OPT_EXPERT, { &video_codec_name }, "force video decoder", "decoder_name" },
{ "autorotate", OPT_BOOL, { &autorotate }, "automatically rotate video", "" },
+ { "find_stream_info", OPT_BOOL | OPT_INPUT | OPT_EXPERT, { &find_stream_info },
+ "read and decode the streams to fill missing information with heuristics" },
{ NULL, },
};