Skip to content

Commit

Permalink
Support -ni option for all formats.
Browse files Browse the repository at this point in the history
Can work around playback issues with badly interleaved files.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@37262 b3059339-0415-0410-9bf9-f77b7e298cf2
  • Loading branch information
reimar committed Aug 31, 2014
1 parent 3dc96cf commit 5687037
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
7 changes: 5 additions & 2 deletions DOCS/man/en/mplayer.1
Original file line number Diff line number Diff line change
Expand Up @@ -1843,9 +1843,12 @@ input file type (available: jpeg, png, tga, sgi)
.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)
Expand Down
2 changes: 1 addition & 1 deletion cfg-common.h
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ const m_option_t common_opts[] = {

{"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},

Expand Down
2 changes: 1 addition & 1 deletion libmpdemux/demuxer.c
Original file line number Diff line number Diff line change
Expand Up @@ -722,7 +722,7 @@ int ds_fill_buffer(demux_stream_t *ds)
// 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)
Expand Down

0 comments on commit 5687037

Please sign in to comment.