# HG changeset patch # User reimar # Date 1409477953 0 # Node ID 3721d8f98dfeda8f1847c3b27f5c516ad5ae9b80 # Parent 681c7f805a239c1ef34e19a102615d793a6c5602 Support -ni option for all formats. Can work around playback issues with badly interleaved files. diff -r 681c7f805a23 -r 3721d8f98dfe DOCS/man/en/mplayer.1 --- a/DOCS/man/en/mplayer.1 Sun Aug 31 09:33:38 2014 +0000 +++ b/DOCS/man/en/mplayer.1 Sun Aug 31 09:39:13 2014 +0000 @@ -1843,9 +1843,12 @@ .PD 1 . .TP -.B \-ni (AVI only) -Force usage of non-interleaved AVI parser (fixes playback +.B \-ni +Force treating files as non-interleaved. +In particular forces usage of non-interleaved AVI parser (fixes playback of some bad AVI files). +Can also help playing files that otherwise play audio +and video alternating instead of at the same time. . .TP .B \-nobps (AVI only) diff -r 681c7f805a23 -r 3721d8f98dfe cfg-common.h --- a/cfg-common.h Sun Aug 31 09:33:38 2014 +0000 +++ b/cfg-common.h Sun Aug 31 09:39:13 2014 +0000 @@ -406,7 +406,7 @@ {"edl", &edl_filename, CONF_TYPE_STRING, 0, 0, 0, NULL}, - // AVI specific: force non-interleaved mode + // force non-interleaved mode {"ni", &force_ni, CONF_TYPE_FLAG, 0, 0, 1, NULL}, {"noni", &force_ni, CONF_TYPE_FLAG, 0, 1, 0, NULL}, diff -r 681c7f805a23 -r 3721d8f98dfe libmpdemux/demuxer.c --- a/libmpdemux/demuxer.c Sun Aug 31 09:33:38 2014 +0000 +++ b/libmpdemux/demuxer.c Sun Aug 31 09:39:13 2014 +0000 @@ -722,7 +722,7 @@ // This needs to be enough for at least 1 second of packets // since libavformat mov demuxer does not try to interleave // with more than 1s precision. - if (ds->fill_count > 80) + if (!force_ni && ds->fill_count > 80) break; // avoid printing the "too many ..." message over and over if (ds->eof)