[MPlayer-users] failed to compile mplayer(cvs) with xvid

Corey Hickey bugfood-ml at fatooh.org
Thu Mar 23 07:26:25 CET 2006


On Sat, March 18, 2006 12:36, yong wrote:
> im using the mingw gcc 3.4.5 to compile mplayer, with xvid 1.2.0
> version.
> but failed with following error:
>
> libavcodec/libavcodec.a(xvid_rc.o):xvid_rc.c:(.text+0x25):
> undefined reference to `mkstemp'
> libavcodec/libavcodec.a(xvid_rc.o):xvid_rc.c:(.text+0x21c):
> undefined reference to `mkstemp'
> collect2: ld returned 1 exit status
> make: *** [mplayer.exe] Error

Ok, here's try 3. This compiles and works for me on mingw. It appears
that libavcodec xvid encoding (all xvid, not just the ratecontrol) was
broken on MinGW. The patch fixes that as well.

For the record, the problem with my last patch was that, unlike
mkstemp(), tempnam() doesn't actually create a file -- it just returns
the name. I never bothered to put in an O_CREAT because the old code
didn't have on either, which is why xvid+mingw didn't work before.

Please test this with whatever you want to throw at it. Bear in mind
that:
(a) vrc_strategy=1 is (for now) ignored for the first pass
(b) xvid likes the first pass to be constant-quantizer (vqscale=2)

The existence of (b) makes (a) not much of a problem; at a constant
quantizer, I think, the only real difference is the frame type
decisions, but I haven't determined experimentally whether that is
true or not, and, either way, how much is affected. Maybe this
weekend...

-Corey
-------------- next part --------------
A non-text attachment was scrubbed...
Name: av_tempfile3.diff
Type: application/octet-stream
Size: 4815 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-users/attachments/20060322/1d709b46/attachment.obj>


More information about the MPlayer-users mailing list