# HG changeset patch # User romansh # Date 1182737284 0 # Node ID a81bd08b5ff264dae254ea02fd096da62a96b5f6 # Parent 32d675fb5e2eb72da64fd3cb9bb8296f539e65a6 * clarifying the AVInputFormat::read_seek return value * changing dv_read_seek() to return the proper value (patch by Maksym Veremeyenko) diff -r 32d675fb5e2e -r a81bd08b5ff2 avformat.h --- 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); diff -r 32d675fb5e2e -r a81bd08b5ff2 dv.c --- 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)