Ticket #693: transcodePatch.diff

File transcodePatch.diff, 1.3 KB (added by gkruse@…, 18 years ago)

patch to fix compile

  • programs/mythtranscode/mpeg2fix.cpp

     
    22//support missing audio frames
    33//support analyze-only mode
    44
     5#include "config.h"
    56#include "mpeg2fix.h"
    67
    78#include <stdlib.h>
     
    1314#include <netinet/in.h>
    1415#include <getopt.h>
    1516#include <stdint.h>
     17#ifndef CONFIG_DARWIN
    1618#include <malloc.h>
     19#endif
    1720
    1821
    1922#define ATTR_ALIGN(align) __attribute__ ((__aligned__ (align)))
     
    280283
    281284    mx.priv = (void *)this;
    282285
    283     fd_out = open64(outfile, O_WRONLY | O_CREAT | O_TRUNC, S_IRWXU);
     286    #ifndef CONFIG_DARWIN
     287        fd_out = open64(outfile, O_WRONLY | O_CREAT | O_TRUNC, S_IRWXU);
     288    #else
     289        fd_out = open(outfile, O_WRONLY | O_CREAT | O_TRUNC, S_IRWXU);
     290    #endif
    284291
    285292    //await buffer fill
    286293    pthread_mutex_lock(&mutex);
     
    818825
    819826    picture = avcodec_alloc_frame();
    820827
    821     pkt->data = (uint8_t *)memalign(16, outbuf_size);
     828    #ifndef CONFIG_DARWIN
     829        pkt->data = (uint8_t *)memalign(16, outbuf_size);
     830    #else
     831        pkt->data = (uint8_t *)malloc(outbuf_size);
     832    #endif
    822833
    823834    picture->data[0] = info->display_fbuf->buf[0];
    824835    picture->data[1] = info->display_fbuf->buf[1];