@@ -131,13 +131,13 @@ write_packet(void *opaque, uint8_t *buf, int buf_size) {
131
131
static int64_t
132
132
size_packet (PyObject * seek_func , const char * which ) {
133
133
PyObject * pos = NULL , * end_pos = NULL , * ret = NULL , * set = NULL ;
134
- int64_t ans = AVERROR_EXTERNAL ;
134
+ long long ans = AVERROR_EXTERNAL ;
135
135
if (!(pos = PyObject_CallFunction (seek_func , "ii" , 0 , SEEK_CUR ))) goto cleanup ;
136
136
if (!(end_pos = PyObject_CallFunction (seek_func , "ii" , 0 , SEEK_END ))) goto cleanup ;
137
137
if (!(set = PyLong_FromLong (SEEK_SET ))) goto cleanup ;
138
138
if (!(ret = PyObject_CallFunctionObjArgs (seek_func , pos , set , NULL ))) goto cleanup ;
139
139
ans = PyLong_AsLongLong (end_pos );
140
- if (debug_io ) printf ("size %s: %ld \n" , which , ans );
140
+ if (debug_io ) printf ("size %s: %lld \n" , which , ans );
141
141
cleanup :
142
142
Py_XDECREF (pos ); Py_XDECREF (end_pos ); Py_XDECREF (ret ); Py_XDECREF (set );
143
143
return ans ;
@@ -149,7 +149,7 @@ seek_packet(PyObject *seek_func, int64_t offset, int whence, const char *which)
149
149
PyObject * ret = PyObject_CallFunction (seek_func , "Li" , (long long )offset , whence );
150
150
if (!ret ) return AVERROR_EXTERNAL ;
151
151
long long ans = PyLong_AsLongLong (ret );
152
- if (debug_io ) printf ("seek %s offset=%ld whence: %d: %lld\n" , which , offset , whence , ans );
152
+ if (debug_io ) printf ("seek %s offset=%lld whence: %d: %lld\n" , which , ( long long ) offset , whence , ans );
153
153
Py_DECREF (ret );
154
154
return ans ;
155
155
}
0 commit comments