summaryrefslogtreecommitdiffstats
path: root/filters/f_decoder_wrapper.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2019-05-25 21:57:31 +0200
committerwm4 <wm4@nowhere>2019-09-19 20:37:04 +0200
commit2c3c6aae66ec606eeb26593f94079b3e920df237 (patch)
tree2f07ab72df0a6b92980cb3d8566320d167b570ba /filters/f_decoder_wrapper.c
parentaaf4efd0123837211d42f001580f34739dfe1d9c (diff)
downloadmpv-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 'filters/f_decoder_wrapper.c')
-rw-r--r--filters/f_decoder_wrapper.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/filters/f_decoder_wrapper.c b/filters/f_decoder_wrapper.c
index 0b2a4f52ec..13ba9398e7 100644
--- a/filters/f_decoder_wrapper.c
+++ b/filters/f_decoder_wrapper.c
@@ -481,6 +481,9 @@ static void feed_packet(struct priv *p)
if (!p->decoder || !mp_pin_in_needs_data(p->decoder->f->pins[0]))
return;
+ if (p->decoded_coverart.type)
+ return;
+
if (!p->packet.type && !p->new_segment) {
p->packet = mp_pin_out_read(p->demux);
if (!p->packet.type)
@@ -657,8 +660,9 @@ static void read_frame(struct priv *p)
return;
if (p->header->attached_picture && frame.type == MP_FRAME_VIDEO) {
- p->decoded_coverart = mp_frame_ref(frame);
- p->coverart_returned = 1;
+ p->decoded_coverart = frame;
+ mp_filter_internal_mark_progress(p->f);
+ return;
}
if (p->public.attempt_framedrops) {