You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
ffplay: add -(no)find_stream_info expert option
This commit is contained in:
committed by
Clément Bœsch
parent
d7ea14c5e2
commit
998687f1b2
12
ffplay.c
12
ffplay.c
@@ -349,6 +349,7 @@ static int nb_vfilters = 0;
|
|||||||
static char *afilters = NULL;
|
static char *afilters = NULL;
|
||||||
#endif
|
#endif
|
||||||
static int autorotate = 1;
|
static int autorotate = 1;
|
||||||
|
static int find_stream_info = 1;
|
||||||
|
|
||||||
/* current context */
|
/* current context */
|
||||||
static int is_full_screen;
|
static int is_full_screen;
|
||||||
@@ -2695,8 +2696,6 @@ static int read_thread(void *arg)
|
|||||||
int64_t stream_start_time;
|
int64_t stream_start_time;
|
||||||
int pkt_in_play_range = 0;
|
int pkt_in_play_range = 0;
|
||||||
AVDictionaryEntry *t;
|
AVDictionaryEntry *t;
|
||||||
AVDictionary **opts;
|
|
||||||
int orig_nb_streams;
|
|
||||||
SDL_mutex *wait_mutex = SDL_CreateMutex();
|
SDL_mutex *wait_mutex = SDL_CreateMutex();
|
||||||
int scan_all_pmts_set = 0;
|
int scan_all_pmts_set = 0;
|
||||||
int64_t pkt_ts;
|
int64_t pkt_ts;
|
||||||
@@ -2746,9 +2745,11 @@ static int read_thread(void *arg)
|
|||||||
|
|
||||||
av_format_inject_global_side_data(ic);
|
av_format_inject_global_side_data(ic);
|
||||||
|
|
||||||
opts = setup_find_stream_info_opts(ic, codec_opts);
|
if (find_stream_info) {
|
||||||
orig_nb_streams = ic->nb_streams;
|
AVDictionary **opts = setup_find_stream_info_opts(ic, codec_opts);
|
||||||
|
int orig_nb_streams = ic->nb_streams;
|
||||||
|
|
||||||
|
// TODO: reindent
|
||||||
err = avformat_find_stream_info(ic, opts);
|
err = avformat_find_stream_info(ic, opts);
|
||||||
|
|
||||||
for (i = 0; i < orig_nb_streams; i++)
|
for (i = 0; i < orig_nb_streams; i++)
|
||||||
@@ -2761,6 +2762,7 @@ static int read_thread(void *arg)
|
|||||||
ret = -1;
|
ret = -1;
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (ic->pb)
|
if (ic->pb)
|
||||||
ic->pb->eof_reached = 0; // FIXME hack, ffplay maybe should not use avio_feof() to test for the end
|
ic->pb->eof_reached = 0; // FIXME hack, ffplay maybe should not use avio_feof() to test for the end
|
||||||
@@ -3557,6 +3559,8 @@ static const OptionDef options[] = {
|
|||||||
{ "scodec", HAS_ARG | OPT_STRING | OPT_EXPERT, { &subtitle_codec_name }, "force subtitle decoder", "decoder_name" },
|
{ "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" },
|
{ "vcodec", HAS_ARG | OPT_STRING | OPT_EXPERT, { &video_codec_name }, "force video decoder", "decoder_name" },
|
||||||
{ "autorotate", OPT_BOOL, { &autorotate }, "automatically rotate video", "" },
|
{ "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, },
|
{ NULL, },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user