Commit 46aa75ee authored by Marton Balint's avatar Marton Balint

ffplay: dump format before selecting streams

This helps the user to see the available streams just before the error message
if the stream specifiers do not match.
Signed-off-by: 's avatarMarton Balint <cus@passwd.hu>
parent 5e7dcb04
...@@ -2959,6 +2959,9 @@ static int read_thread(void *arg) ...@@ -2959,6 +2959,9 @@ static int read_thread(void *arg)
is->realtime = is_realtime(ic); is->realtime = is_realtime(ic);
if (show_status)
av_dump_format(ic, 0, is->filename, 0);
for (i = 0; i < ic->nb_streams; i++) { for (i = 0; i < ic->nb_streams; i++) {
AVStream *st = ic->streams[i]; AVStream *st = ic->streams[i];
enum AVMediaType type = st->codec->codec_type; enum AVMediaType type = st->codec->codec_type;
...@@ -2992,9 +2995,6 @@ static int read_thread(void *arg) ...@@ -2992,9 +2995,6 @@ static int read_thread(void *arg)
st_index[AVMEDIA_TYPE_AUDIO] : st_index[AVMEDIA_TYPE_AUDIO] :
st_index[AVMEDIA_TYPE_VIDEO]), st_index[AVMEDIA_TYPE_VIDEO]),
NULL, 0); NULL, 0);
if (show_status) {
av_dump_format(ic, 0, is->filename, 0);
}
is->show_mode = show_mode; is->show_mode = show_mode;
if (st_index[AVMEDIA_TYPE_VIDEO] >= 0) { if (st_index[AVMEDIA_TYPE_VIDEO] >= 0) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment