]> git.sesse.net Git - ffmpeg/blobdiff - ffplay.c
avformat/mux: implement AVFMT_FLAG_SHORTEST
[ffmpeg] / ffplay.c
index b0702ebeb0fa36f7a8e57a945874defbb8fd53fa..adbe9cb4e1fd9e6d6e4434fcf318e8a9b988b021 100644 (file)
--- a/ffplay.c
+++ b/ffplay.c
@@ -2936,7 +2936,7 @@ static int read_thread(void *arg)
         AVStream *st = ic->streams[i];
         enum AVMediaType type = st->codecpar->codec_type;
         st->discard = AVDISCARD_ALL;
-        if (wanted_stream_spec[type] && st_index[type] == -1)
+        if (type >= 0 && wanted_stream_spec[type] && st_index[type] == -1)
             if (avformat_match_stream_specifier(ic, st, wanted_stream_spec[type]) > 0)
                 st_index[type] = i;
     }
@@ -3776,6 +3776,8 @@ int main(int argc, char **argv)
     char dummy_videodriver[] = "SDL_VIDEODRIVER=dummy";
     char alsa_bufsize[] = "SDL_AUDIO_ALSA_SET_BUFFER_SIZE=1";
 
+    init_dynload();
+
     av_log_set_flags(AV_LOG_SKIP_REPEATED);
     parse_loglevel(argc, argv, options);