mirror of https://github.com/mpv-player/mpv
demux_lavf: use AVDISCARD_DEFAULT instead of AVDISCARD_NONE
AVDISCARD_DEFAULT is probably a bit better for normal decoding. AVDISCARD_NONE would (as by documentation) include "useless" packets too, while DEFAULT filters these.
This commit is contained in:
parent
a6706c41d8
commit
83eb28fff7
|
@ -801,7 +801,7 @@ static int demux_lavf_control(demuxer_t *demuxer, int cmd, void *arg)
|
||||||
AVStream *st = priv->avfc->streams[n];
|
AVStream *st = priv->avfc->streams[n];
|
||||||
if (stream && stream->type != STREAM_SUB) {
|
if (stream && stream->type != STREAM_SUB) {
|
||||||
bool selected = demuxer_stream_is_selected(demuxer, stream);
|
bool selected = demuxer_stream_is_selected(demuxer, stream);
|
||||||
st->discard = selected ? AVDISCARD_NONE : AVDISCARD_ALL;
|
st->discard = selected ? AVDISCARD_DEFAULT : AVDISCARD_ALL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return DEMUXER_CTRL_OK;
|
return DEMUXER_CTRL_OK;
|
||||||
|
|
Loading…
Reference in New Issue