Mercurial > libavformat.hg
diff ffm.c @ 558:89bd76208427 libavformat
100l (forgoten seeking functions)
| author | michael |
|---|---|
| date | Mon, 11 Oct 2004 23:53:53 +0000 |
| parents | 26a477a5ebda |
| children | 095009fc2f35 |
line wrap: on
line diff
--- a/ffm.c Mon Oct 11 19:42:18 2004 +0000 +++ b/ffm.c Mon Oct 11 23:53:53 2004 +0000 @@ -627,7 +627,7 @@ /* seek to a given time in the file. The file read pointer is positionned at or before pts. XXX: the following code is quite approximative */ -static int ffm_seek(AVFormatContext *s, int64_t wanted_pts) +static int ffm_seek(AVFormatContext *s, int stream_index, int64_t wanted_pts, int flags) { FFMContext *ffm = s->priv_data; offset_t pos_min, pos_max, pos; @@ -662,7 +662,7 @@ pos_min = pos + FFM_PACKET_SIZE; } } - pos = pos_min; + pos = (flags & AVSEEK_FLAG_BACKWARD) ? pos_min : pos_max; if (pos > 0) pos -= FFM_PACKET_SIZE; found:
