mirror of
https://github.com/mpv-player/mpv
synced 2024-12-19 05:15:12 +00:00
demux: ignore false underrun reporting from eia_608 captions decoder
This commit is contained in:
parent
7163c95cfd
commit
f57ff79867
@ -457,6 +457,7 @@ void demuxer_feed_caption(struct sh_stream *stream, demux_packet_t *dp)
|
||||
return;
|
||||
}
|
||||
sh->codec->codec = "eia_608";
|
||||
sh->ignore_eof = true;
|
||||
stream->ds->cc = sh;
|
||||
demux_add_sh_stream(demuxer, sh);
|
||||
}
|
||||
@ -1659,6 +1660,8 @@ static int cached_demux_control(struct demux_internal *in, int cmd, void *arg)
|
||||
int num_packets = 0;
|
||||
for (int n = 0; n < in->num_streams; n++) {
|
||||
struct demux_stream *ds = in->streams[n]->ds;
|
||||
if (in->streams[n]->ignore_eof)
|
||||
continue;
|
||||
if (ds->active && !(!ds->head && ds->eof)) {
|
||||
r->underrun |= !ds->head && !ds->eof;
|
||||
r->ts_range[0] = MP_PTS_MAX(r->ts_range[0], ds->base_ts);
|
||||
|
@ -56,6 +56,7 @@ struct sh_stream {
|
||||
|
||||
// Internal to demux.c
|
||||
struct demux_stream *ds;
|
||||
bool ignore_eof; // ignore stream in underrun detection
|
||||
};
|
||||
|
||||
struct mp_codec_params {
|
||||
|
Loading…
Reference in New Issue
Block a user