Opened 14 years ago

Closed 14 years ago

#693 closed patch (fixed)

PATCH: mythtranscode compile fix

Reported by: gkruse@… Owned by: Isaac Richards
Priority: minor Milestone: 0.19
Component: mythtv Version: head
Severity: medium Keywords: mythtranscode osx mpeg2fix compile
Cc: Ticket locked: no

Description

On os x the new mpeg2 code in mythtranscode does not compile for several reasons:

1) malloc.h is not found (doesn't exist and is not needed on osx?) 2) there is no function called open64() on os x (I think this is for large file support however open() seems to work fine on os x) 3) there is no memalign() function on os x because malloc() returns aligned memory by default

The attached patch corrects all of these issues. It compiles cleanly and I have tested it on one recording. It would be interesting to see if it will work on files > 2 gb.

Attachments (1)

transcodePatch.diff (1.3 KB) - added by gkruse@… 14 years ago.
patch to fix compile

Download all attachments as: .zip

Change History (4)

Changed 14 years ago by gkruse@…

Attachment: transcodePatch.diff added

patch to fix compile

comment:1 Changed 14 years ago by Isaac Richards

Resolution: fixed
Status: newclosed

(In [8002]) Close #693, but use av_malloc for aligned mem, and O_LARGEFILE for open.

comment:2 Changed 14 years ago by gkruse@…

Resolution: fixed
Status: closedreopened

unfortunately, os x also lacks a O_LARGEFILE definition so this fix doesn't exactly work. (Great OS huh?) I'm pretty sure (TM) that just plain old open works for large files on os x.

mpeg2fix.cpp:284: error: `O_LARGEFILE' undeclared (first use this function)

the open() man page says nothing about large files on os x

comment:3 Changed 14 years ago by Isaac Richards

Resolution: fixed
Status: reopenedclosed

(In [8006]) Close #693 again. Forgot to define O_LARGEFILE if it doesn't exist.

Note: See TracTickets for help on using tickets.