[Libav-user] Building with MSVC toolchain resulting in seeking problem?
Hendrik Leppkes
h.leppkes at gmail.com
Tue Mar 12 16:14:37 CET 2013
On Tue, Mar 12, 2013 at 4:10 PM, Carl Eugen Hoyos <cehoyos at ag.or.at> wrote:
> John Orr <john.orr at ...> writes:
>
>> if (whence == AVSEEK_SIZE) {
>> #ifndef _MSC_VER
>> struct stat st;
>>
>> ret = fstat(c->fd, &st);
>> #else
>> struct _stat64 st;
>> ret = _fstati64( c->fd, &st );
>> #endif
>> return ret < 0 ? AVERROR(errno) : (S_ISFIFO(st.st_mode) ? 0 :
>> st.st_size);
>> }
>> #ifndef _MSC_VER
>> ret = lseek(c->fd, pos, whence);
>> #else
>> ret = _lseeki64(c->fd, pos, whence);
>> #endif
>
> Perhaps you could (fix the whitespace and) send a patch
> to ffmpeg-devel or set up a git clone to allow merging?
>
If you send a patch, then first look at libavformat/os_support.h, it
already has defines for mingw to map these functions, and should
probably be enhanced there, instead of cluttering file.c with #ifdefs.
More information about the Libav-user
mailing list