[MPlayer-dev-eng] [PATCH]libmpdemux: Increase MAX_PACK_BYTES
Reimar Döffinger
Reimar.Doeffinger at gmx.de
Tue Mar 8 22:05:36 CET 2016
On Tue, Mar 08, 2016 at 08:43:09PM +0000, Carl Eugen Hoyos wrote:
> Reimar Döffinger <Reimar.Doeffinger <at> gmx.de> writes:
>
> > > Attached patch (at least 0xB000000) is needed for playback of
> > > the file mentioned in this vlc bug report:
> > > https://trac.videolan.org/vlc/ticket/16684
> > > Without the patch, I see this message with -lavdopts threads=8:
> > > Too many video packets in the buffer: (10 in 36844684 bytes).
> >
> > To be honest I kind of think we shouldn't need to buffer over
> > 160 MB of uncompressed (!) video data just to play a file.
>
> The way I read my command line and the error message
> is that ten frames are buffered with eight decoding
> threads which doesn't seem a lot to me.
The behaviour doesn't change with only 1 thread.
Unless I miss something those are exclusively
buffered packets, it does not include those
currently being decoded.
> > Isn't that the broken interleaving of the FFmpeg demuxer
> > again that causes the issue?
>
> I didn't now this issue but other issues are of course
> possible.
> Did you try to reproduce?
My computer is too slow so I run into this issue no
matter what (due to audio running too far ahead),
but see at the end for a hack for this issue.
There also seems to be an issue in that the recovery
from full buffer does not seem to work right,
causing audio and video to run completely alternatingly
when the intention is for it to play
audio + video
video only to empty buffer
audio + video
...
Not sure what breaks it.
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -4929,8 +4929,8 @@ static AVIndexEntry *mov_find_next_sample(AVFormatContext *s, AVStream **st)
if (!sample || (!s->pb->seekable && current_sample->pos < sample->pos) ||
(s->pb->seekable &&
((msc->pb != s->pb && dts < best_dts) || (msc->pb == s->pb &&
- ((FFABS(best_dts - dts) <= AV_TIME_BASE && current_sample->pos < sample->pos) ||
- (FFABS(best_dts - dts) > AV_TIME_BASE && dts < best_dts)))))) {
+ ((FFABS(best_dts - dts) <= AV_TIME_BASE/16 && current_sample->pos < sample->pos) ||
+ (FFABS(best_dts - dts) > AV_TIME_BASE/16 && dts < best_dts)))))) {
sample = current_sample;
best_dts = dts;
*st = avst;
More information about the MPlayer-dev-eng
mailing list