History

url_fskip: Return an error code if the url_fseek failed

Originally committed as revision 24277 to svn://svn.ffmpeg.org/ffmpeg/trunk

Martin Storsjö committed 16 years ago

Commit d5e9dde1 parent 5c327552 files · +5 −3Browse files

Unified · Split

2 files
  1. libavformat/avio.h +2 −1
  2. libavformat/aviobuf.c +3 −2
libavformat/avio.h+2−1
@@ -358,8 +358,9 @@ int64_t url_fseek(ByteIOContext *s, int64_t offset, int whence); · 357 unmodified lines
358358 /**
359359 * Skip given number of bytes forward.
360360 * @param offset number of bytes
361+ * @return 0 on success, <0 on error
361362 */
362−void url_fskip(ByteIOContext *s, int64_t offset);
363+int url_fskip(ByteIOContext *s, int64_t offset);
363364
364365 /**
365366 * ftell() equivalent for ByteIOContext.
libavformat/aviobuf.c+3−2
@@ -182,9 +182,10 @@ int64_t url_fseek(ByteIOContext *s, int64_t offset, int whence) · 181 unmodified lines
182182 return offset;
183183 }
184184
185−void url_fskip(ByteIOContext *s, int64_t offset)
185+int url_fskip(ByteIOContext *s, int64_t offset)
186186 {
187− url_fseek(s, offset, SEEK_CUR);
187+ int64_t ret = url_fseek(s, offset, SEEK_CUR);
188+ return ret < 0 ? ret : 0;
188189 }
189190
190191 int64_t url_ftell(ByteIOContext *s)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t