diff options
author | wm4 <wm4@nowhere> | 2019-05-25 21:57:31 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2019-09-19 20:37:04 +0200 |
commit | 2c3c6aae66ec606eeb26593f94079b3e920df237 (patch) | |
tree | 2f07ab72df0a6b92980cb3d8566320d167b570ba /demux/demux.c | |
parent | aaf4efd0123837211d42f001580f34739dfe1d9c (diff) | |
download | mpv-2c3c6aae66ec606eeb26593f94079b3e920df237.tar.bz2 mpv-2c3c6aae66ec606eeb26593f94079b3e920df237.tar.xz |
demux, f_decoder_wrapper: fix coverart in backward mode
Shitty ancient hack that wastes my time all the time.
demux.c: always return the coverart packet as soon as possible, and
don't let the backward demux state machine possibly stop it.
f_decoder_wrapper.c: mess with some shit until it somehow starts to
work. I think the old code tried to let it cleverly fall through so the
packet was processed "normally"; just make it run the "usual" code
instead.
Diffstat (limited to 'demux/demux.c')
-rw-r--r-- | demux/demux.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/demux/demux.c b/demux/demux.c index 92f2eaacc4..bd62e6f0ef 100644 --- a/demux/demux.c +++ b/demux/demux.c @@ -2258,17 +2258,6 @@ static int dequeue_packet(struct demux_stream *ds, struct demux_packet **res) if (in->blocked) return 0; - if (ds->eager) { - in->reading = true; // enable readahead - in->eof = false; // force retry - pthread_cond_signal(&in->wakeup); // possibly read more - } - - if (ds->back_resuming || ds->back_restarting) { - assert(in->back_demuxing); - return 0; - } - if (ds->sh->attached_picture) { ds->eof = true; if (ds->attached_picture_added) @@ -2282,6 +2271,17 @@ static int dequeue_packet(struct demux_stream *ds, struct demux_packet **res) return 1; } + if (ds->eager) { + in->reading = true; // enable readahead + in->eof = false; // force retry + pthread_cond_signal(&in->wakeup); // possibly read more + } + + if (ds->back_resuming || ds->back_restarting) { + assert(in->back_demuxing); + return 0; + } + bool eof = !ds->reader_head && ds->eof; if (in->back_demuxing) { |