Mercurial > mplayer.hg
changeset 33238:b09a5d9ff050
Call demux_fill_buffer multiple times when trying to get a
video timestamp.
author | reimar |
---|---|
date | Sun, 24 Apr 2011 23:27:24 +0000 |
parents | a8619bfabf84 |
children | 6cb191a2cc1a |
files | libmpdemux/demux_demuxers.c |
diffstat | 1 files changed, 7 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/libmpdemux/demux_demuxers.c Sun Apr 24 23:06:38 2011 +0000 +++ b/libmpdemux/demux_demuxers.c Sun Apr 24 23:27:24 2011 +0000 @@ -104,7 +104,13 @@ // Get the new pos pos = demuxer->video->pts; if (!pos) { - demux_fill_buffer(priv->vd, demuxer->video); + // since the video demuxer might provide multiple + // streams (e.g. subs) we might have to call + // demux_fill_buffer multiple times. + int limit = 10; + do { + demux_fill_buffer(priv->vd, demuxer->video); + } while (--limit && !demuxer->video->first); if (demuxer->video->first) pos = demuxer->video->first->pts; }