aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/ogg_extractor.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/ogg_extractor.c')
-rw-r--r--src/plugins/ogg_extractor.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/plugins/ogg_extractor.c b/src/plugins/ogg_extractor.c
index cef6b38..c42bc01 100644
--- a/src/plugins/ogg_extractor.c
+++ b/src/plugins/ogg_extractor.c
@@ -69,7 +69,7 @@ read_ogg (void *ptr, size_t size, size_t nmemb, void *datasource)
69 * @param datasource the 'struct EXTRACTOR_ExtractContext' 69 * @param datasource the 'struct EXTRACTOR_ExtractContext'
70 * @param offset where to seek 70 * @param offset where to seek
71 * @param whence how to seek 71 * @param whence how to seek
72 * @return -1 on error 72 * @return -1 on error, new position on success
73 */ 73 */
74static int 74static int
75seek_ogg (void *datasource, 75seek_ogg (void *datasource,
@@ -77,12 +77,8 @@ seek_ogg (void *datasource,
77 int whence) 77 int whence)
78{ 78{
79 struct EXTRACTOR_ExtractContext *ec = datasource; 79 struct EXTRACTOR_ExtractContext *ec = datasource;
80 80 int64_t new_position = ec->seek (ec->cls, (int64_t) offset, whence);
81 if (-1 == ec->seek (ec->cls, 81 return (long) new_position;
82 (int64_t) offset,
83 whence))
84 return -1;
85 return 0;
86} 82}
87 83
88 84
@@ -162,7 +158,8 @@ EXTRACTOR_ogg_extract_method (struct EXTRACTOR_ExtractContext *ec)
162 callbacks.seek_func = &seek_ogg; 158 callbacks.seek_func = &seek_ogg;
163 callbacks.close_func = NULL; 159 callbacks.close_func = NULL;
164 callbacks.tell_func = &tell_ogg; 160 callbacks.tell_func = &tell_ogg;
165 if (0 != ov_open_callbacks (ec, &vf, NULL, 0, callbacks)) 161 ret = ov_open_callbacks (ec, &vf, NULL, 0, callbacks);
162 if (0 != ret)
166 { 163 {
167 ov_clear (&vf); 164 ov_clear (&vf);
168 return; 165 return;