Mercurial > libavformat.hg
changeset 2203:a81bd08b5ff2 libavformat
* clarifying the AVInputFormat::read_seek return value
* changing dv_read_seek() to return the proper value
(patch by Maksym Veremeyenko)
author | romansh |
---|---|
date | Mon, 25 Jun 2007 02:08:04 +0000 |
parents | 32d675fb5e2e |
children | 6f3e0f91b7db |
files | avformat.h dv.c |
diffstat | 2 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/avformat.h Sun Jun 24 21:50:09 2007 +0000 +++ b/avformat.h Mon Jun 25 02:08:04 2007 +0000 @@ -216,6 +216,7 @@ * @param stream_index must not be -1 * @param flags selects which direction should be preferred if no exact * match is available + * @return >= 0 on success (but not necessarily the new offset) */ int (*read_seek)(struct AVFormatContext *, int stream_index, int64_t timestamp, int flags);
--- a/dv.c Sun Jun 24 21:50:09 2007 +0000 +++ b/dv.c Mon Jun 25 02:08:04 2007 +0000 @@ -426,7 +426,8 @@ dv_offset_reset(c, offset / c->sys->frame_size); - return url_fseek(&s->pb, offset, SEEK_SET); + offset = url_fseek(&s->pb, offset, SEEK_SET); + return (offset < 0)?offset:0; } static int dv_read_close(AVFormatContext *s)