mirror of
https://github.com/mpv-player/mpv
synced 2025-03-19 09:57:34 +00:00
demux: fix edl/ordered chapter operation
I refactored this in a previous commit, and my testing was insufficient.
This appeared to work - by coincidence this demuxed the video stream in
some tests files (so it appeared to work to me), but all other packets
were discarded and leaked.
Fixes: fec3a4792a
This commit is contained in:
parent
6b0f4a94dd
commit
95b17119e5
@ -2377,7 +2377,7 @@ struct demux_packet *demux_read_any_packet(struct demuxer *demuxer)
|
||||
in->reading = true; // force read_packet() to read
|
||||
int r = dequeue_packet(in->streams[n]->ds, &out_pkt);
|
||||
if (r > 0)
|
||||
break;
|
||||
goto done;
|
||||
if (r == 0)
|
||||
all_eof = false;
|
||||
}
|
||||
@ -2385,6 +2385,7 @@ struct demux_packet *demux_read_any_packet(struct demuxer *demuxer)
|
||||
read_more = thread_work(in);
|
||||
read_more &= !all_eof;
|
||||
}
|
||||
done:
|
||||
pthread_mutex_unlock(&in->lock);
|
||||
return out_pkt;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user