[MPlayer-dev-eng] [PATCH] demux_lavf: add an option to use the new seek API.
Nicolas George
nicolas.george at normalesup.org
Mon Apr 29 23:38:08 CEST 2013
Le decadi 10 floréal, an CCXXI, Reimar Döffinger a écrit :
> Of which you set neither min or max, that was my point...
The flag indicating the preferred direction is set. Look at the existing
code:
if (av_seek_frame(priv->avfc, -1, priv->last_pts, avsflags) < 0) {
avsflags ^= AVSEEK_FLAG_BACKWARD;
av_seek_frame(priv->avfc, -1, priv->last_pts, avsflags);
}
Translation: try to seek in the selected direction, if it fails, try to seek
in the opposite direction. There is neither an upper nor a lower bound to
the target timestamp, just a preferred direction.
Unless I completely misunderstood the API, that is exactly what
avformat_seek_file() does with min = INT64_MIN, max = INT64_MAX and flags
set to the preferred direction.
Setting min (or max) would serve to force the direction forward (or
backward), but there is no point in doing that and then trying the opposite
direction immediately.
Regards,
--
Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20130429/9a6b68b4/attachment.asc>
More information about the MPlayer-dev-eng
mailing list