diff options
author | Lars-Dominik Braun <lars@6xq.net> | 2014-04-07 15:51:49 +0200 |
---|---|---|
committer | Lars-Dominik Braun <lars@6xq.net> | 2014-04-07 15:51:49 +0200 |
commit | 2b08e319fa20dbb61a207dd3429ee666ca17fc4d (patch) | |
tree | 21a41ffc030beed756197eec45493daed45a76ab | |
parent | e0441f5fbe0f028038d66048113438aa8a938946 (diff) | |
download | pianobar-windows-2b08e319fa20dbb61a207dd3429ee666ca17fc4d.tar.gz pianobar-windows-2b08e319fa20dbb61a207dd3429ee666ca17fc4d.tar.bz2 pianobar-windows-2b08e319fa20dbb61a207dd3429ee666ca17fc4d.zip |
player: discard unused streamns
Shouldn’t make a difference right now. Just in case…
-rw-r--r-- | src/player.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/player.c b/src/player.c index e16f690..ac5c42b 100644 --- a/src/player.c +++ b/src/player.c @@ -124,6 +124,11 @@ void *BarPlayerThread (void *data) { softfail ("find_stream_info"); } + /* ignore all streams, undone for audio stream below */ + for (size_t i = 0; i < fctx->nb_streams; i++) { + fctx->streams[i]->discard = AVDISCARD_ALL; + } + const int streamIdx = av_find_best_stream (fctx, AVMEDIA_TYPE_AUDIO, -1, -1, NULL, 0); if (streamIdx < 0) { @@ -132,6 +137,7 @@ void *BarPlayerThread (void *data) { AVStream * const st = fctx->streams[streamIdx]; cctx = st->codec; + st->discard = AVDISCARD_DEFAULT; /* decoder setup */ AVCodec * const decoder = avcodec_find_decoder (cctx->codec_id); |