summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorTuomas Virtanen <katajakasa@gmail.com>2018-07-01 22:04:49 +0300
committerTuomas Virtanen <katajakasa@gmail.com>2018-07-01 22:04:49 +0300
commit2ea872a24eda920974ea1c9b69542248620c306a (patch)
treec57e648d06003736aeffea810e1f6723b96d2726 /examples
parent6d30b5ed4a555875f504d13ebb362205fbbf056f (diff)
Handle AVSEEK_FORCE
Diffstat (limited to 'examples')
-rw-r--r--examples/example_custom.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/example_custom.c b/examples/example_custom.c
index 2f84b99..d666550 100644
--- a/examples/example_custom.c
+++ b/examples/example_custom.c
@@ -24,8 +24,8 @@ int read_callback(void *userdata, uint8_t *buf, int buf_size) {
int64_t seek_callback(void *userdata, int64_t offset, int whence) {
FILE *fd = (FILE*)userdata;
- if(whence == 3) { // AVSEEK_SIZE
- return -1; // Not supported
+ if(whence != SEEK_SET && whence != SEEK_END && whence != SEEK_CUR) {
+ return -1; // AVSEEK_SIZE, AVSEEK_FORCE Not supported
}
if(fseek(fd, offset, whence)) {
return ftell(fd);