[FFmpeg-cvslog] r9418 - in trunk/libavformat: avformat.h dv.c

romansh subversion
Mon Jun 25 04:08:06 CEST 2007


Author: romansh
Date: Mon Jun 25 04:08:04 2007
New Revision: 9418

Log:
  * clarifying the AVInputFormat::read_seek return value
  * changing dv_read_seek() to return the proper value 
    (patch by Maksym Veremeyenko)




Modified:
   trunk/libavformat/avformat.h
   trunk/libavformat/dv.c

Modified: trunk/libavformat/avformat.h
==============================================================================
--- trunk/libavformat/avformat.h	(original)
+++ trunk/libavformat/avformat.h	Mon Jun 25 04:08:04 2007
@@ -216,6 +216,7 @@ typedef struct AVInputFormat {
      * @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);

Modified: trunk/libavformat/dv.c
==============================================================================
--- trunk/libavformat/dv.c	(original)
+++ trunk/libavformat/dv.c	Mon Jun 25 04:08:04 2007
@@ -426,7 +426,8 @@ static int dv_read_seek(AVFormatContext 
 
     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)




More information about the ffmpeg-cvslog mailing list