summaryrefslogtreecommitdiffstats
path: root/demux/demux.c
diff options
context:
space:
mode:
authorAman Gupta <aman@tmm1.net>2017-10-13 14:13:32 -0700
committerwm4 <wm4@nowhere>2017-10-20 22:14:54 +0200
commitf57ff798670af4cbb1d8fc357b40adeaf90f9696 (patch)
tree68393ebdcda5cf1336877f6d3e183eba0ae7c0aa /demux/demux.c
parent7163c95cfd1a74e47c24a2f21b33124520a5e7f1 (diff)
downloadmpv-f57ff798670af4cbb1d8fc357b40adeaf90f9696.tar.bz2
mpv-f57ff798670af4cbb1d8fc357b40adeaf90f9696.tar.xz
demux: ignore false underrun reporting from eia_608 captions decoder
Diffstat (limited to 'demux/demux.c')
-rw-r--r--demux/demux.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/demux/demux.c b/demux/demux.c
index b80fbeaff7..2356d0ad3f 100644
--- a/demux/demux.c
+++ b/demux/demux.c
@@ -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);