X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=ffplay.c;h=adbe9cb4e1fd9e6d6e4434fcf318e8a9b988b021;hb=3bf142c77337814458ed8e036796934032d9837f;hp=f28e0877cd65df0858b0f64554c8cc278d6f68f1;hpb=e6d0acd4383d9400d3c6f174e3d8abb98ec38818;p=ffmpeg diff --git a/ffplay.c b/ffplay.c index f28e0877cd6..adbe9cb4e1f 100644 --- a/ffplay.c +++ b/ffplay.c @@ -2725,7 +2725,7 @@ static int stream_component_open(VideoState *is, int stream_index) goto fail; link = is->out_audio_filter->inputs[0]; sample_rate = link->sample_rate; - nb_channels = link->channels; + nb_channels = avfilter_link_get_channels(link); channel_layout = link->channel_layout; } #else @@ -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);