summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2010-09-14 16:38:12 +0000
committerjstebbins <[email protected]>2010-09-14 16:38:12 +0000
commit50a9b814396811fc33885d70d2798a6c8c1c595e (patch)
tree7eee7df15967f65c5ad17e5f2ec33e886afc68ae
parentc1a82127fc2d99293cf27d3821d5ab85c93cc4ec (diff)
Bump ffmpeg from 22950 to 25082
It's been 5 months since an ffmpeg bump. One negative is that we loose LATM support. The LATM patch is just impossible to apply anymore since ffmpeg dropped support for using the external faad lib. There are ifdef's in the code should anyone wish to revert to an earlier ffmpeg and enable LATM. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3526 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r--contrib/ffmpeg/A00-latm.patch903
-rw-r--r--contrib/ffmpeg/A04-mov-seek.patch13
-rw-r--r--contrib/ffmpeg/P03-mingw-gnu99.patch22
-rw-r--r--contrib/ffmpeg/module.defs4
-rw-r--r--gtk/src/Makefile.am4
-rw-r--r--gtk/src/main.c5
-rw-r--r--libhb/module.defs2
-rw-r--r--libhb/stream.c7
-rw-r--r--macosx/HandBrake.xcodeproj/project.pbxproj20
-rw-r--r--macosx/main.mm6
-rw-r--r--test/module.defs2
11 files changed, 54 insertions, 934 deletions
diff --git a/contrib/ffmpeg/A00-latm.patch b/contrib/ffmpeg/A00-latm.patch
deleted file mode 100644
index 192d703cc..000000000
--- a/contrib/ffmpeg/A00-latm.patch
+++ /dev/null
@@ -1,903 +0,0 @@
-Index: ffmpeg-r22950/libavcodec/allcodecs.c
-===================================================================
---- ffmpeg-r22950/libavcodec/allcodecs.c (revision 22950)
-+++ ffmpeg-r22950/libavcodec/allcodecs.c (working copy)
-@@ -334,6 +334,7 @@
- REGISTER_ENCDEC (LIBDIRAC, libdirac);
- REGISTER_ENCODER (LIBFAAC, libfaac);
- REGISTER_DECODER (LIBFAAD, libfaad);
-+ REGISTER_DECODER (LIBFAAD, libfaad2);
- REGISTER_ENCDEC (LIBGSM, libgsm);
- REGISTER_ENCDEC (LIBGSM_MS, libgsm_ms);
- REGISTER_ENCODER (LIBMP3LAME, libmp3lame);
-@@ -349,6 +350,7 @@
-
- /* parsers */
- REGISTER_PARSER (AAC, aac);
-+ REGISTER_PARSER (AAC, aac_latm);
- REGISTER_PARSER (AC3, ac3);
- REGISTER_PARSER (CAVSVIDEO, cavsvideo);
- REGISTER_PARSER (DCA, dca);
-Index: ffmpeg-r22950/libavcodec/avcodec.h
-===================================================================
---- ffmpeg-r22950/libavcodec/avcodec.h (revision 22950)
-+++ ffmpeg-r22950/libavcodec/avcodec.h (working copy)
-@@ -286,6 +286,7 @@
- CODEC_ID_MP2= 0x15000,
- CODEC_ID_MP3, ///< preferred ID for decoding MPEG audio layer 1, 2 or 3
- CODEC_ID_AAC,
-+ CODEC_ID_AAC_LATM,
- CODEC_ID_AC3,
- CODEC_ID_DTS,
- CODEC_ID_VORBIS,
-Index: ffmpeg-r22950/libavcodec/Makefile
-===================================================================
---- ffmpeg-r22950/libavcodec/Makefile (revision 22950)
-+++ ffmpeg-r22950/libavcodec/Makefile (working copy)
-@@ -505,7 +505,7 @@
- OBJS-$(CONFIG_LIBDIRAC_DECODER) += libdiracdec.o
- OBJS-$(CONFIG_LIBDIRAC_ENCODER) += libdiracenc.o libdirac_libschro.o
- OBJS-$(CONFIG_LIBFAAC_ENCODER) += libfaac.o
--OBJS-$(CONFIG_LIBFAAD_DECODER) += libfaad.o
-+OBJS-$(CONFIG_LIBFAAD_DECODER) += libfaad.o latmaac.o
- OBJS-$(CONFIG_LIBGSM_DECODER) += libgsm.o
- OBJS-$(CONFIG_LIBGSM_ENCODER) += libgsm.o
- OBJS-$(CONFIG_LIBGSM_MS_DECODER) += libgsm.o
-@@ -529,7 +529,7 @@
-
- # parsers
- OBJS-$(CONFIG_AAC_PARSER) += aac_parser.o aac_ac3_parser.o \
-- mpeg4audio.o
-+ mpeg4audio.o latm_parser.o
- OBJS-$(CONFIG_AC3_PARSER) += ac3_parser.o ac3tab.o \
- aac_ac3_parser.o
- OBJS-$(CONFIG_CAVSVIDEO_PARSER) += cavs_parser.o
-Index: ffmpeg-r22950/libavcodec/latmaac.c
-===================================================================
---- ffmpeg-r22950/libavcodec/latmaac.c (revision 0)
-+++ ffmpeg-r22950/libavcodec/latmaac.c (revision 0)
-@@ -0,0 +1,642 @@
-+/*
-+ * copyright (c) 2008 Paul Kendall <[email protected]>
-+ *
-+ * This file is part of FFmpeg.
-+ *
-+ * FFmpeg is free software; you can redistribute it and/or
-+ * modify it under the terms of the GNU Lesser General Public
-+ * License as published by the Free Software Foundation; either
-+ * version 2.1 of the License, or (at your option) any later version.
-+ *
-+ * FFmpeg is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ * Lesser General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU Lesser General Public
-+ * License along with FFmpeg; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-+ */
-+
-+/**
-+ * @file latmaac.c
-+ * LATM wrapped AAC decoder
-+ */
-+
-+#include <stdio.h>
-+#include <stdlib.h>
-+#include <string.h>
-+#include <math.h>
-+#include <sys/types.h>
-+
-+#include "parser.h"
-+#include "get_bits.h"
-+#include "put_bits.h"
-+#include "mpeg4audio.h"
-+#include "neaacdec.h"
-+
-+#define min(a,b) ((a)<(b) ? (a) : (b))
-+
-+
-+/*
-+ Note: This decoder filter is intended to decode LATM streams transferred
-+ in MPEG transport streams which are only supposed to contain one program.
-+ To do a more complex LATM demuxing a separate LATM demuxer should be used.
-+*/
-+
-+#define AAC_NONE 0 // mode not detected (or indicated in mediatype)
-+#define AAC_LATM 1 // LATM packets (ISO/IEC 14496-3 1.7.3 Multiplex layer)
-+
-+#define SYNC_LATM 0x2b7 // 11 bits
-+
-+#define MAX_SIZE 8*1024
-+
-+typedef struct AACConfig
-+{
-+ uint8_t extra[64]; // should be way enough
-+ int extrasize;
-+
-+ int audioObjectType;
-+ int samplingFrequencyIndex;
-+ int samplingFrequency;
-+ int channelConfiguration;
-+ int channels;
-+} AACConfig;
-+
-+typedef struct AACParser
-+{
-+ AACConfig config;
-+ uint8_t frameLengthType;
-+ uint16_t muxSlotLengthBytes;
-+
-+ uint8_t audio_mux_version;
-+ uint8_t audio_mux_version_A;
-+ int taraFullness;
-+ uint8_t config_crc;
-+ int64_t other_data_bits;
-+
-+ int mode;
-+ int offset; // byte offset in "buf" buffer
-+ uint8_t buf[MAX_SIZE]; // allocated buffer
-+ int count; // number of bytes written in buffer
-+} AACParser;
-+
-+typedef struct AACDecoder
-+{
-+ AACParser *parser;
-+ faacDecHandle aac_decoder;
-+ int open;
-+ uint32_t in_samplerate;
-+ uint8_t in_channels;
-+} AACDecoder;
-+
-+typedef struct {
-+ AACDecoder* decoder;
-+} FAACContext;
-+
-+static inline int64_t latm_get_value(GetBitContext *b)
-+{
-+ uint8_t bytesForValue = get_bits(b, 2);
-+ int64_t value = 0;
-+ int i;
-+ for (i=0; i<=bytesForValue; i++) {
-+ value <<= 8;
-+ value |= get_bits(b, 8);
-+ }
-+ return value;
-+}
-+
-+static void readGASpecificConfig(struct AACConfig *cfg, GetBitContext *b, PutBitContext *o)
-+{
-+ int framelen_flag;
-+ int dependsOnCoder;
-+ int ext_flag;
-+ int delay;
-+ int layerNr;
-+
-+ framelen_flag = get_bits(b, 1);
-+ put_bits(o, 1, framelen_flag);
-+ dependsOnCoder = get_bits(b, 1);
-+ put_bits(o, 1, dependsOnCoder);
-+
-+ if (dependsOnCoder) {
-+ delay = get_bits(b, 14);
-+ put_bits(o, 14, delay);
-+ }
-+ ext_flag = get_bits(b, 1);
-+ put_bits(o, 1, ext_flag);
-+ if (!cfg->channelConfiguration) {
-+ // program config element
-+ // TODO:
-+ }
-+
-+ if (cfg->audioObjectType == 6 || cfg->audioObjectType == 20) {
-+ layerNr = get_bits(b, 3);
-+ put_bits(o, 3, layerNr);
-+ }
-+ if (ext_flag) {
-+ if (cfg->audioObjectType == 22) {
-+ skip_bits(b, 5); // numOfSubFrame
-+ skip_bits(b, 11); // layer_length
-+
-+ put_bits(o, 16, 0);
-+ }
-+ if (cfg->audioObjectType == 17 ||
-+ cfg->audioObjectType == 19 ||
-+ cfg->audioObjectType == 20 ||
-+ cfg->audioObjectType == 23) {
-+
-+ skip_bits(b, 3); // stuff
-+ put_bits(o, 3, 0);
-+ }
-+
-+ skip_bits(b, 1); // extflag3
-+ put_bits(o, 1, 0);
-+ }
-+}
-+
-+static int readAudioSpecificConfig(struct AACConfig *cfg, GetBitContext *b)
-+{
-+ int ret;
-+ int sbr_present;
-+ PutBitContext o;
-+
-+ init_put_bits(&o, cfg->extra, sizeof(cfg->extra));
-+
-+ // returns the number of bits read
-+
-+ ret = 0;
-+ sbr_present = -1;
-+ // object
-+ cfg->audioObjectType = get_bits(b, 5);
-+ put_bits(&o, 5, cfg->audioObjectType);
-+ if (cfg->audioObjectType == 31) {
-+ uint8_t n = get_bits(b, 6);
-+ put_bits(&o, 6, n);
-+ cfg->audioObjectType = 32 + n;
-+ }
-+
-+ cfg->samplingFrequencyIndex = get_bits(b, 4);
-+ cfg->samplingFrequency = ff_mpeg4audio_sample_rates[cfg->samplingFrequencyIndex];
-+ put_bits(&o, 4, cfg->samplingFrequencyIndex);
-+ if (cfg->samplingFrequencyIndex == 0x0f) {
-+ uint32_t f = get_bits_long(b, 24);
-+ put_bits(&o, 24, f);
-+ cfg->samplingFrequency = f;
-+ }
-+ cfg->channelConfiguration = get_bits(b, 4);
-+ put_bits(&o, 4, cfg->channelConfiguration);
-+ cfg->channels = ff_mpeg4audio_channels[cfg->channelConfiguration];
-+
-+ if (cfg->audioObjectType == 5) {
-+ sbr_present = 1;
-+
-+ // TODO: parsing !!!!!!!!!!!!!!!!
-+ }
-+
-+ switch (cfg->audioObjectType) {
-+ case 1:
-+ case 2:
-+ case 3:
-+ case 4:
-+ case 6:
-+ case 7:
-+ case 17:
-+ case 19:
-+ case 20:
-+ case 21:
-+ case 22:
-+ case 23:
-+ readGASpecificConfig(cfg, b, &o);
-+ break;
-+ }
-+
-+ if (sbr_present == -1) {
-+ if (cfg->samplingFrequency <= 24000) {
-+ cfg->samplingFrequency *= 2;
-+ }
-+ }
-+
-+ // count the extradata
-+ ret = put_bits_count(&o);
-+ align_put_bits(&o);
-+ flush_put_bits(&o);
-+ cfg->extrasize = (ret + 7) >> 3;
-+ return ret;
-+}
-+
-+static void readStreamMuxConfig(struct AACParser *parser, GetBitContext *b)
-+{
-+ parser->audio_mux_version_A = 0;
-+ parser->audio_mux_version = get_bits(b, 1);
-+ if (parser->audio_mux_version == 1) { // audioMuxVersion
-+ parser->audio_mux_version_A = get_bits(b, 1);
-+ }
-+
-+ if (parser->audio_mux_version_A == 0) {
-+ int frame_length_type;
-+
-+ if (parser->audio_mux_version == 1) {
-+ parser->taraFullness = latm_get_value(b);
-+ }
-+ get_bits(b, 1); // allStreamSameTimeFraming = 1
-+ get_bits(b, 6); // numSubFrames = 0
-+ get_bits(b, 4); // numPrograms = 0
-+
-+ // for each program
-+ get_bits(b, 3); // numLayer = 0
-+
-+ // for each layer
-+ if (parser->audio_mux_version == 0) {
-+ // audio specific config.
-+ readAudioSpecificConfig(&parser->config, b);
-+ } else {
-+ int ascLen = latm_get_value(b);
-+ ascLen -= readAudioSpecificConfig(&parser->config, b);
-+
-+ // fill bits
-+ while (ascLen > 16) {
-+ skip_bits(b, 16);
-+ ascLen -= 16;
-+ }
-+ skip_bits(b, ascLen);
-+ }
-+
-+ // these are not needed... perhaps
-+ frame_length_type = get_bits(b, 3);
-+ parser->frameLengthType = frame_length_type;
-+ if (frame_length_type == 0) {
-+ get_bits(b, 8);
-+ } else if (frame_length_type == 1) {
-+ get_bits(b, 9);
-+ } else if (frame_length_type == 3 ||
-+ frame_length_type == 4 ||
-+ frame_length_type == 5) {
-+ int celp_table_index;
-+ celp_table_index = get_bits(b, 6);
-+ } else if (frame_length_type == 6 ||
-+ frame_length_type == 7) {
-+ int hvxc_table_index;
-+ hvxc_table_index = get_bits(b, 1);
-+ }
-+
-+ // other data
-+ parser->other_data_bits = 0;
-+ if (get_bits(b, 1)) {
-+ // other data present
-+ if (parser->audio_mux_version == 1) {
-+ parser->other_data_bits = latm_get_value(b);
-+ } else {
-+ // other data not present
-+ int esc, tmp;
-+ parser->other_data_bits = 0;
-+ do {
-+ parser->other_data_bits <<= 8;
-+ esc = get_bits(b, 1);
-+ tmp = get_bits(b, 8);
-+ parser->other_data_bits |= tmp;
-+ } while (esc);
-+ }
-+ }
-+
-+ // CRC
-+ if (get_bits(b, 1)) {
-+ parser->config_crc = get_bits(b, 8);
-+ }
-+ } else {
-+ // tbd
-+ }
-+}
-+
-+static void readPayloadLengthInfo(struct AACParser *parser, GetBitContext *b)
-+{
-+ uint8_t tmp;
-+ if (parser->frameLengthType == 0) {
-+ parser->muxSlotLengthBytes = 0;
-+ do {
-+ tmp = get_bits(b, 8);
-+ parser->muxSlotLengthBytes += tmp;
-+ } while (tmp == 255);
-+ } else {
-+ if (parser->frameLengthType == 5 ||
-+ parser->frameLengthType == 7 ||
-+ parser->frameLengthType == 3) {
-+ get_bits(b, 2);
-+ }
-+ }
-+}
-+
-+static void readAudioMuxElement(struct AACParser *parser, GetBitContext *b, uint8_t *payload, int *payloadsize)
-+{
-+ uint8_t use_same_mux = get_bits(b, 1);
-+ if (!use_same_mux) {
-+ readStreamMuxConfig(parser, b);
-+ }
-+
-+ if (parser->audio_mux_version_A == 0) {
-+ int j;
-+
-+ readPayloadLengthInfo(parser, b);
-+
-+ // copy data
-+ for (j=0; j<parser->muxSlotLengthBytes; j++) {
-+ *payload++ = get_bits(b, 8);
-+ }
-+ *payloadsize = parser->muxSlotLengthBytes;
-+
-+ // ignore otherdata
-+ } else {
-+ // TBD
-+ }
-+}
-+
-+static int readAudioSyncStream(struct AACParser *parser, GetBitContext *b, int size, uint8_t *payload, int *payloadsize)
-+{
-+ int muxlength;
-+ // ISO/IEC 14496-3 Table 1.28 - Syntax of AudioMuxElement()
-+ if (get_bits(b, 11) != 0x2b7) return -1; // not LATM
-+ muxlength = get_bits(b, 13);
-+
-+ if (3+muxlength > size) return 0; // not enough data
-+
-+ readAudioMuxElement(parser, b, payload, payloadsize);
-+
-+ // we don't parse anything else here...
-+ return (3+muxlength);
-+}
-+
-+
-+static void flush_buf(struct AACParser *parser, int offset) {
-+ int bytes_to_flush = min(parser->count, offset);
-+ int left = (parser->count - bytes_to_flush);
-+
-+ if (bytes_to_flush > 0) {
-+ if (left > 0) {
-+ memcpy(parser->buf, parser->buf+bytes_to_flush, left);
-+ parser->count = left;
-+ } else {
-+ parser->count = 0;
-+ }
-+ }
-+}
-+
-+static struct AACParser *latm_create_parser()
-+{
-+ struct AACParser *parser = (struct AACParser *)av_malloc(sizeof(struct AACParser));
-+ memset(parser, 0, sizeof(struct AACParser));
-+ return parser;
-+}
-+
-+static void latm_destroy_parser(struct AACParser *parser)
-+{
-+ av_free(parser);
-+}
-+
-+static void latm_flush(struct AACParser *parser)
-+{
-+ parser->offset = 0;
-+ parser->count = 0;
-+}
-+
-+static void latm_write_data(struct AACParser *parser, uint8_t *data, int len)
-+{
-+ // buffer overflow check... just ignore the data before
-+ if (parser->count + len > MAX_SIZE) {
-+ flush_buf(parser, parser->offset);
-+ parser->offset = 0;
-+ if (parser->count + len > MAX_SIZE) {
-+ int to_flush = (parser->count+len) - MAX_SIZE;
-+ flush_buf(parser, to_flush);
-+ }
-+ }
-+
-+ // append data
-+ memcpy(parser->buf+parser->count, data, len);
-+ parser->count += len;
-+}
-+
-+static int latm_parse_packet(struct AACParser *parser, uint8_t *data, int maxsize)
-+{
-+ /*
-+ Return value is either number of bytes parsed or
-+ -1 when failed.
-+ 0 = need more data.
-+ */
-+
-+ uint8_t *start = parser->buf + parser->offset;
-+ int bytes = parser->count - parser->offset;
-+ GetBitContext b;
-+ init_get_bits(&b, start, bytes);
-+
-+ if (parser->mode == AAC_LATM) {
-+ int outsize = 0;
-+ int ret = readAudioSyncStream(parser, &b, bytes, data, &outsize);
-+
-+ if (ret < 0) return -1;
-+ if (ret == 0) return 0;
-+
-+ // update the offset
-+ parser->offset += ret;
-+ return outsize;
-+ }
-+
-+ // check for syncwords
-+ while (bytes > 2) {
-+ if (show_bits(&b, 11) == SYNC_LATM) {
-+ // we must parse config first...
-+ int outsize = 0;
-+
-+ // check if there is a complete packet available...
-+ int ret = readAudioSyncStream(parser, &b, bytes, data, &outsize);
-+ if (ret < 0) return -1;
-+ if (ret == 0) return 0;
-+ parser->offset += ret;
-+
-+ parser->mode = AAC_LATM;
-+ return outsize;
-+ }
-+ skip_bits(&b, 8);
-+ parser->offset++;
-+ bytes--;
-+ }
-+ return 0;
-+}
-+
-+static void aac_filter_close(AACDecoder *decoder)
-+{
-+ if (decoder->aac_decoder) {
-+ NeAACDecClose(decoder->aac_decoder);
-+ decoder->aac_decoder = NULL;
-+ }
-+ decoder->open = 0;
-+}
-+
-+static int aac_decoder_open(AACDecoder *decoder)
-+{
-+ if (decoder->aac_decoder) return 0;
-+
-+ decoder->aac_decoder = NeAACDecOpen();
-+ if (!decoder->aac_decoder) return -1;
-+
-+ // are we going to initialize from decoder specific info ?
-+ if (decoder->parser->config.extrasize > 0) {
-+ char ret;
-+ unsigned long samplerate;
-+
-+ ret = NeAACDecInit2(decoder->aac_decoder, (unsigned char*)decoder->parser->config.extra, decoder->parser->config.extrasize, &samplerate, &decoder->in_channels);
-+ decoder->in_samplerate = samplerate;
-+ if (ret < 0) {
-+ aac_filter_close(decoder); // gone wrong ?
-+ return -1;
-+ }
-+ decoder->open = 1;
-+ } else {
-+ // we'll open the decoder later...
-+ decoder->open = 0;
-+ }
-+ return 0;
-+}
-+
-+static AACDecoder *aac_filter_create()
-+{
-+ AACDecoder *decoder = (AACDecoder *)av_malloc(sizeof(AACDecoder));
-+ decoder->parser = latm_create_parser();
-+ decoder->aac_decoder = NULL;
-+ decoder->open = 0;
-+ return (void *)decoder;
-+}
-+
-+static void aac_filter_destroy(AACDecoder *decoder)
-+{
-+ aac_filter_close(decoder);
-+ latm_destroy_parser(decoder->parser);
-+ av_free(decoder);
-+}
-+
-+static int aac_filter_receive(AACDecoder *decoder, void *out, int *out_size, uint8_t *data, int size)
-+{
-+ uint8_t tempbuf[32*1024];
-+ int ret;
-+ int consumed = size;
-+ int decoded;
-+ int max_size = *out_size;
-+
-+ *out_size = 0;
-+
-+ //-------------------------------------------------------------------------
-+ // Multiplex Parsing
-+ //-------------------------------------------------------------------------
-+
-+ latm_write_data(decoder->parser, data, size);
-+
-+ do {
-+ NeAACDecFrameInfo info;
-+ void *buf;
-+
-+ ret = latm_parse_packet(decoder->parser, tempbuf, sizeof(tempbuf));
-+ if (ret < 0) {
-+ latm_flush(decoder->parser);
-+ return consumed;
-+ }
-+ if (ret == 0) return consumed;
-+
-+ data = tempbuf;
-+ size = ret;
-+
-+ //-------------------------------------------------------------------------
-+ // Initialize decoder (if necessary)
-+ //-------------------------------------------------------------------------
-+ if (!decoder->open) {
-+ aac_filter_close(decoder);
-+ if (decoder->parser->mode == AAC_LATM) {
-+ ret = aac_decoder_open(decoder);
-+ if (ret < 0) return consumed;
-+ }
-+
-+ if(!decoder->open) return consumed;
-+ }
-+
-+ //-------------------------------------------------------------------------
-+ // Decode samples
-+ //-------------------------------------------------------------------------
-+ buf = NeAACDecDecode(decoder->aac_decoder, &info, data, size);
-+
-+ if (buf) {
-+ decoder->in_samplerate = info.samplerate;
-+ decoder->in_channels = info.channels;
-+
-+ //---------------------------------------------------------------------
-+ // Deliver decoded samples
-+ //---------------------------------------------------------------------
-+
-+ // kram dekoduje 16-bit. my vypustame 16-bit. takze by to malo byt okej
-+ decoded = info.samples * sizeof(short);
-+
-+ // napraskame tam sample
-+ *out_size += decoded;
-+ if(*out_size > max_size) {
-+ av_log(NULL, AV_LOG_ERROR, "overflow!\n");
-+ } else {
-+ memcpy(out, buf, decoded);
-+ out = (unsigned char *)out + decoded;
-+ }
-+ } else {
-+ // need more data
-+ break;
-+ }
-+
-+ } while (1); // decode all packets
-+ return consumed;
-+}
-+
-+static void aac_filter_getinfo(AACDecoder *decoder, int *sample_rate, int *channels)
-+{
-+ if(!decoder->open) return;
-+ *sample_rate = decoder->in_samplerate;
-+ *channels = decoder->in_channels;
-+}
-+
-+static int faac_decode_init(AVCodecContext *avctx)
-+{
-+ FAACContext *s = avctx->priv_data;
-+ avctx->sample_fmt = SAMPLE_FMT_S16;
-+ avctx->frame_size = 360;
-+ avctx->sample_rate = 48000;
-+ avctx->channels = 2;
-+ avctx->bit_rate = 8192 * 8 * avctx->sample_rate / avctx->frame_size;
-+ s->decoder = aac_filter_create();
-+ return 0;
-+}
-+
-+static int faac_decode_frame(AVCodecContext *avctx,
-+ void *data, int *data_size,
-+ AVPacket *avpkt)
-+{
-+ FAACContext *s = avctx->priv_data;
-+ int ret;
-+
-+ if (s->decoder == NULL) faac_decode_init(avctx);
-+ ret = aac_filter_receive(s->decoder, data, data_size, avpkt->data, avpkt->size);
-+ aac_filter_getinfo(s->decoder, &(avctx->sample_rate), &(avctx->channels));
-+ return ret;
-+}
-+
-+static int faac_decode_end(AVCodecContext *avctx)
-+{
-+ FAACContext *s = avctx->priv_data;
-+ if(s->decoder != NULL) {
-+ aac_filter_destroy(s->decoder);
-+ }
-+ return 0;
-+}
-+
-+AVCodec libfaad2_decoder = {
-+ .name = "AAC_LATM",
-+ .type = CODEC_TYPE_AUDIO,
-+ .id = CODEC_ID_AAC_LATM,
-+ .priv_data_size = sizeof (FAACContext),
-+ .init = faac_decode_init,
-+ .close = faac_decode_end,
-+ .decode = faac_decode_frame,
-+ .long_name = "AAC over LATM",
-+};
-Index: ffmpeg-r22950/libavcodec/latm_parser.c
-===================================================================
---- ffmpeg-r22950/libavcodec/latm_parser.c (revision 0)
-+++ ffmpeg-r22950/libavcodec/latm_parser.c (revision 0)
-@@ -0,0 +1,128 @@
-+/*
-+ * LATM parser
-+ * Copyright (c) 2008 Paul Kendall <[email protected]>
-+ *
-+ * This file is part of FFmpeg.
-+ *
-+ * FFmpeg is free software; you can redistribute it and/or
-+ * modify it under the terms of the GNU Lesser General Public
-+ * License as published by the Free Software Foundation; either
-+ * version 2.1 of the License, or (at your option) any later version.
-+ *
-+ * FFmpeg is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ * Lesser General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU Lesser General Public
-+ * License along with FFmpeg; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-+ */
-+
-+/**
-+ * @file latm_parser.c
-+ * LATM parser
-+ */
-+
-+#include "parser.h"
-+
-+#define LATM_HEADER 0x56e000 // 0x2b7 (11 bits)
-+#define LATM_MASK 0xFFE000 // top 11 bits
-+#define LATM_SIZE_MASK 0x001FFF // bottom 13 bits
-+
-+typedef struct LATMParseContext{
-+ ParseContext pc;
-+ int count;
-+} LATMParseContext;
-+
-+/**
-+ * finds the end of the current frame in the bitstream.
-+ * @return the position of the first byte of the next frame, or -1
-+ */
-+static int latm_find_frame_end(AVCodecParserContext *s1, const uint8_t *buf,
-+ int buf_size) {
-+ LATMParseContext *s = s1->priv_data;
-+ ParseContext *pc = &s->pc;
-+ int pic_found, i;
-+ uint32_t state;
-+
-+ pic_found = pc->frame_start_found;
-+ state = pc->state;
-+
-+ i = 0;
-+ if(!pic_found){
-+ for(i=0; i<buf_size; i++){
-+ state = (state<<8) | buf[i];
-+ if((state & LATM_MASK) == LATM_HEADER){
-+ i++;
-+ s->count = - i;
-+ pic_found=1;
-+ break;
-+ }
-+ }
-+ }
-+
-+ if(pic_found){
-+ /* EOF considered as end of frame */
-+ if (buf_size == 0)
-+ return 0;
-+ if((state & LATM_SIZE_MASK) - s->count <= buf_size) {
-+ pc->frame_start_found = 0;
-+ pc->state = -1;
-+ return (state & LATM_SIZE_MASK) - s->count;
-+ }
-+ }
-+
-+ s->count += buf_size;
-+ pc->frame_start_found = pic_found;
-+ pc->state = state;
-+ return END_NOT_FOUND;
-+}
-+
-+static int latm_parse(AVCodecParserContext *s1,
-+ AVCodecContext *avctx,
-+ const uint8_t **poutbuf, int *poutbuf_size,
-+ const uint8_t *buf, int buf_size)
-+{
-+ LATMParseContext *s = s1->priv_data;
-+ ParseContext *pc = &s->pc;
-+ int next;
-+
-+ if(s1->flags & PARSER_FLAG_COMPLETE_FRAMES){
-+ next = buf_size;
-+ }else{
-+ next = latm_find_frame_end(s1, buf, buf_size);
-+
-+ if (ff_combine_frame(pc, next, &buf, &buf_size) < 0) {
-+ *poutbuf = NULL;
-+ *poutbuf_size = 0;
-+ return buf_size;
-+ }
-+ }
-+ *poutbuf = buf;
-+ *poutbuf_size = buf_size;
-+ return next;
-+}
-+
-+static int latm_split(AVCodecContext *avctx,
-+ const uint8_t *buf, int buf_size)
-+{
-+ int i;
-+ uint32_t state= -1;
-+
-+ for(i=0; i<buf_size; i++){
-+ state= (state<<8) | buf[i];
-+ if((state & LATM_MASK) == LATM_HEADER)
-+ return i-2;
-+ }
-+ return 0;
-+}
-+
-+AVCodecParser aac_latm_parser = {
-+ { CODEC_ID_AAC_LATM },
-+ sizeof(LATMParseContext),
-+ NULL,
-+ latm_parse,
-+ ff_parse_close,
-+ latm_split,
-+};
-Index: ffmpeg-r22950/libavformat/mpegts.c
-===================================================================
---- ffmpeg-r22950/libavformat/mpegts.c (revision 22950)
-+++ ffmpeg-r22950/libavformat/mpegts.c (working copy)
-@@ -497,7 +497,7 @@
- { 0x04, AVMEDIA_TYPE_AUDIO, CODEC_ID_MP3 },
- { 0x0f, AVMEDIA_TYPE_AUDIO, CODEC_ID_AAC },
- { 0x10, AVMEDIA_TYPE_VIDEO, CODEC_ID_MPEG4 },
-- //{ 0x11, AVMEDIA_TYPE_AUDIO, CODEC_ID_AAC }, /* LATM syntax */
-+ { 0x11, AVMEDIA_TYPE_AUDIO, CODEC_ID_AAC_LATM }, /* LATM syntax */
- { 0x1b, AVMEDIA_TYPE_VIDEO, CODEC_ID_H264 },
- { 0xd1, AVMEDIA_TYPE_VIDEO, CODEC_ID_DIRAC },
- { 0xea, AVMEDIA_TYPE_VIDEO, CODEC_ID_VC1 },
-@@ -684,7 +684,7 @@
-
- if ((!pes->st && pes->stream->nb_streams == MAX_STREAMS) ||
- (pes->st && pes->st->discard == AVDISCARD_ALL) ||
-- code == 0x1be) /* padding_stream */
-+ code == 0x1be || code == 0x1fa) /* padding_stream */
- goto skip;
-
- /* stream not present in PMT */
-Index: ffmpeg-r22950/libavformat/mpegts.h
-===================================================================
---- ffmpeg-r22950/libavformat/mpegts.h (revision 22950)
-+++ ffmpeg-r22950/libavformat/mpegts.h (working copy)
-@@ -49,6 +49,7 @@
- #define STREAM_TYPE_PRIVATE_DATA 0x06
- #define STREAM_TYPE_AUDIO_AAC 0x0f
- #define STREAM_TYPE_VIDEO_MPEG4 0x10
-+#define STREAM_TYPE_AUDIO_AAC_LATM 0x11
- #define STREAM_TYPE_VIDEO_H264 0x1b
- #define STREAM_TYPE_VIDEO_VC1 0xea
- #define STREAM_TYPE_VIDEO_DIRAC 0xd1
-Index: ffmpeg-r22950/libavformat/mpeg.c
-===================================================================
---- ffmpeg-r22950/libavformat/mpeg.c (revision 22950)
-+++ ffmpeg-r22950/libavformat/mpeg.c (working copy)
-@@ -287,7 +287,7 @@
- /* find matching stream */
- if (!((startcode >= 0x1c0 && startcode <= 0x1df) ||
- (startcode >= 0x1e0 && startcode <= 0x1ef) ||
-- (startcode == 0x1bd) || (startcode == 0x1fd)))
-+ (startcode == 0x1bd) || (startcode == 0x1fa) || (startcode == 0x1fd)))
- goto redo;
- if (ppos) {
- *ppos = url_ftell(s->pb) - 4;
-@@ -454,6 +454,9 @@
- } else if(es_type == STREAM_TYPE_AUDIO_AAC){
- codec_id = CODEC_ID_AAC;
- type = AVMEDIA_TYPE_AUDIO;
-+ } else if(es_type == STREAM_TYPE_AUDIO_AAC_LATM){
-+ codec_id = CODEC_ID_AAC_LATM;
-+ type = CODEC_TYPE_AUDIO;
- } else if(es_type == STREAM_TYPE_VIDEO_MPEG4){
- codec_id = CODEC_ID_MPEG4;
- type = AVMEDIA_TYPE_VIDEO;
-Index: ffmpeg-r22950/libavformat/mpeg.h
-===================================================================
---- ffmpeg-r22950/libavformat/mpeg.h (revision 22950)
-+++ ffmpeg-r22950/libavformat/mpeg.h (working copy)
-@@ -53,6 +53,7 @@
- #define STREAM_TYPE_PRIVATE_DATA 0x06
- #define STREAM_TYPE_AUDIO_AAC 0x0f
- #define STREAM_TYPE_VIDEO_MPEG4 0x10
-+#define STREAM_TYPE_AUDIO_AAC_LATM 0x11
- #define STREAM_TYPE_VIDEO_H264 0x1b
-
- #define STREAM_TYPE_AUDIO_AC3 0x81
diff --git a/contrib/ffmpeg/A04-mov-seek.patch b/contrib/ffmpeg/A04-mov-seek.patch
deleted file mode 100644
index ecfff65ce..000000000
--- a/contrib/ffmpeg/A04-mov-seek.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-Index: libavformat/mov.c
-===================================================================
---- ffmpeg.orig/libavformat/mov.c (revision 22950)
-+++ ffmpeg/libavformat/mov.c (working copy)
-@@ -2466,6 +2466,8 @@
-
- sample = av_index_search_timestamp(st, timestamp, flags);
- dprintf(s, "stream %d, timestamp %"PRId64", sample %d\n", st->index, timestamp, sample);
-+ if (sample < 0 && st->nb_index_entries && timestamp < st->index_entries[0].timestamp)
-+ sample = 0;
- if (sample < 0) /* not sure what to do */
- return -1;
- sc->current_sample = sample;
diff --git a/contrib/ffmpeg/P03-mingw-gnu99.patch b/contrib/ffmpeg/P03-mingw-gnu99.patch
new file mode 100644
index 000000000..06a598dd0
--- /dev/null
+++ b/contrib/ffmpeg/P03-mingw-gnu99.patch
@@ -0,0 +1,22 @@
+Index: configure
+===================================================================
+--- ffmpeg.orig/configure (revision 25082)
++++ ffmpeg/configure (working copy)
+@@ -2222,7 +2222,7 @@
+ fi
+
+ add_cppflags -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112
+-check_cflags -std=c99
++check_cflags -std=gnu99
+ check_cc -D_FILE_OFFSET_BITS=64 <<EOF && add_cppflags -D_FILE_OFFSET_BITS=64
+ #include <stdlib.h>
+ EOF
+@@ -2230,7 +2230,7 @@
+ #include <stdlib.h>
+ EOF
+
+-check_host_cflags -std=c99
++check_host_cflags -std=gnu99
+
+ case "$arch" in
+ alpha|ia64|mips|parisc|sparc)
diff --git a/contrib/ffmpeg/module.defs b/contrib/ffmpeg/module.defs
index 4ad4a2122..82d4be780 100644
--- a/contrib/ffmpeg/module.defs
+++ b/contrib/ffmpeg/module.defs
@@ -1,7 +1,7 @@
$(eval $(call import.MODULE.defs,FFMPEG,ffmpeg,BZIP2 FAAD2 ZLIB))
$(eval $(call import.CONTRIB.defs,FFMPEG))
-FFMPEG.FETCH.url = http://download.m0k.org/handbrake/contrib/ffmpeg-r22950.tar.bz2
+FFMPEG.FETCH.url = http://download.m0k.org/handbrake/contrib/ffmpeg-r25082.tar.bz2
FFMPEG.CONFIGURE.deps =
FFMPEG.CONFIGURE.env =
@@ -15,12 +15,12 @@ FFMPEG.CONFIGURE.extra = \
--disable-muxers \
--disable-network \
--disable-vaapi \
+ --disable-dxva2 \
--enable-bzlib \
--enable-encoder=ac3 \
--enable-encoder=mpeg4 \
--enable-encoder=snow \
--enable-gpl \
- --enable-libfaad \
--enable-muxer=ipod \
--enable-zlib \
--cc="$(FFMPEG.GCC.gcc)" \
diff --git a/gtk/src/Makefile.am b/gtk/src/Makefile.am
index 42d5d7f78..aec38fcfe 100644
--- a/gtk/src/Makefile.am
+++ b/gtk/src/Makefile.am
@@ -2,13 +2,13 @@
if MINGW
HB_LIBS= \
- -lhb -la52 -lmkv -lavformat -lavcodec -lavutil -ldca -ldvdnav -ldvdread \
+ -lhb -la52 -lmkv -lavformat -lavcodec -lavutil -lavcore -ldca -ldvdnav -ldvdread \
-lfaac -lmp3lame -lmpeg2 -lvorbis -lvorbisenc -logg -lsamplerate \
-lx264 -lmp4v2 -lswscale -ltheora -lfaad -lz \
-lbz2 -liberty -lpthreadGC2 -lbluray
else
HB_LIBS= \
- -lhb -la52 -lmkv -lavformat -lavcodec -lavutil -ldca -ldvdnav -ldvdread \
+ -lhb -la52 -lmkv -lavformat -lavcodec -lavutil -lavcore -ldca -ldvdnav -ldvdread \
-lfaac -lmp3lame -lmpeg2 -lvorbis -lvorbisenc -logg -lsamplerate \
-lx264 -lmp4v2 -lswscale -ltheora -lfaad -lz \
-lbz2 -lpthread -lbluray
diff --git a/gtk/src/main.c b/gtk/src/main.c
index 7e62d6099..4fde5d69d 100644
--- a/gtk/src/main.c
+++ b/gtk/src/main.c
@@ -716,10 +716,6 @@ watch_volumes(signal_user_data_t *ud)
#endif
}
-// Hack to avoid a segfault in libavcodec
-extern int mm_flags;
-int mm_support();
-
G_MODULE_EXPORT void x264_entry_changed_cb(GtkWidget *widget, signal_user_data_t *ud);
void preview_window_expose_cb(void);
@@ -765,7 +761,6 @@ main (int argc, char *argv[])
GError *error = NULL;
GOptionContext *context;
- mm_flags = mm_support();
#ifdef ENABLE_NLS
bindtextdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR);
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
diff --git a/libhb/module.defs b/libhb/module.defs
index b4b1964c9..c6fb9dceb 100644
--- a/libhb/module.defs
+++ b/libhb/module.defs
@@ -89,7 +89,7 @@ LIBHB.dll = $(LIBHB.build/)hb.dll
LIBHB.lib = $(LIBHB.build/)hb.lib
LIBHB.dll.libs = $(foreach n, \
- a52 avcodec avformat avutil dca dvdnav dvdread faac faad mkv mpeg2 mp3lame mp4v2 \
+ a52 avcore avcodec avformat avutil dca dvdnav dvdread faac faad mkv mpeg2 mp3lame mp4v2 \
ogg samplerate swscale theora vorbis vorbisenc x264 bluray, \
$(CONTRIB.build/)lib/lib$(n).a )
diff --git a/libhb/stream.c b/libhb/stream.c
index 733727c08..9166ace41 100644
--- a/libhb/stream.c
+++ b/libhb/stream.c
@@ -58,7 +58,11 @@ static const stream2codec_t st2codec[256] = {
st(0x0e, N, 0, 0, "ISO 13818-1 auxiliary"),
st(0x0f, A, HB_ACODEC_MPGA, CODEC_ID_AAC, "ISO 13818-7 AAC Audio"),
st(0x10, V, WORK_DECAVCODECV, CODEC_ID_MPEG4, "MPEG4"),
+#if defined(OLD_LATM_PATCH)
st(0x11, A, HB_ACODEC_MPGA, CODEC_ID_AAC_LATM, "MPEG4 LATM AAC"),
+#else
+ st(0x11, N, 0, 0, "MPEG4 LATM AAC"),
+#endif
st(0x12, U, 0, 0, "MPEG4 generic"),
st(0x14, N, 0, 0, "ISO 13818-6 DSM-CC download"),
@@ -2543,6 +2547,7 @@ int hb_ts_decode_pkt( hb_stream_t *stream, const uint8_t * pkt, hb_buffer_t *obu
( pkt[10] >> 7 );
++stream->ts_pcr_in;
stream->ts_found_pcr = 1;
+ stream->ts_flags |= TS_HAS_PCR;
}
}
@@ -2667,7 +2672,7 @@ int hb_ts_decode_pkt( hb_stream_t *stream, const uint8_t * pkt, hb_buffer_t *obu
return 0;
}
// if we have a dts use it otherwise use the pts
- stream->ts_pcr = pes_timestamp( pes + ( pes[7] & 0x40? 14 : 9 ) );
+ stream->ts_pcr = pes_timestamp( pes + ( pes[7] & 0x40?14:9 ) );
++stream->ts_pcr_in;
}
}
diff --git a/macosx/HandBrake.xcodeproj/project.pbxproj b/macosx/HandBrake.xcodeproj/project.pbxproj
index d329c9d28..a163f5237 100644
--- a/macosx/HandBrake.xcodeproj/project.pbxproj
+++ b/macosx/HandBrake.xcodeproj/project.pbxproj
@@ -719,6 +719,7 @@
"$(EXTERNAL_BUILD)/contrib/lib/libavcodec.a",
"$(EXTERNAL_BUILD)/contrib/lib/libavformat.a",
"$(EXTERNAL_BUILD)/contrib/lib/libavutil.a",
+ "$(EXTERNAL_BUILD)/contrib/lib/libavcore.a",
"$(EXTERNAL_BUILD)/contrib/lib/libdca.a",
"$(EXTERNAL_BUILD)/contrib/lib/libdvdnav.a",
"$(EXTERNAL_BUILD)/contrib/lib/libdvdread.a",
@@ -751,6 +752,7 @@
"$(EXTERNAL_BUILD)/contrib/lib/libavcodec.a",
"$(EXTERNAL_BUILD)/contrib/lib/libavformat.a",
"$(EXTERNAL_BUILD)/contrib/lib/libavutil.a",
+ "$(EXTERNAL_BUILD)/contrib/lib/libavcore.a",
"$(EXTERNAL_BUILD)/contrib/lib/libdca.a",
"$(EXTERNAL_BUILD)/contrib/lib/libdvdnav.a",
"$(EXTERNAL_BUILD)/contrib/lib/libdvdread.a",
@@ -818,6 +820,7 @@
"$(EXTERNAL_BUILD)/contrib/lib/libavcodec.a",
"$(EXTERNAL_BUILD)/contrib/lib/libavformat.a",
"$(EXTERNAL_BUILD)/contrib/lib/libavutil.a",
+ "$(EXTERNAL_BUILD)/contrib/lib/libavcore.a",
"$(EXTERNAL_BUILD)/contrib/lib/libdca.a",
"$(EXTERNAL_BUILD)/contrib/lib/libdvdnav.a",
"$(EXTERNAL_BUILD)/contrib/lib/libdvdread.a",
@@ -856,6 +859,7 @@
"$(EXTERNAL_BUILD)/contrib/lib/libavcodec.a",
"$(EXTERNAL_BUILD)/contrib/lib/libavformat.a",
"$(EXTERNAL_BUILD)/contrib/lib/libavutil.a",
+ "$(EXTERNAL_BUILD)/contrib/lib/libavcore.a",
"$(EXTERNAL_BUILD)/contrib/lib/libdca.a",
"$(EXTERNAL_BUILD)/contrib/lib/libdvdnav.a",
"$(EXTERNAL_BUILD)/contrib/lib/libdvdread.a",
@@ -944,6 +948,7 @@
"$(EXTERNAL_BUILD)/contrib/lib/libavcodec.a",
"$(EXTERNAL_BUILD)/contrib/lib/libavformat.a",
"$(EXTERNAL_BUILD)/contrib/lib/libavutil.a",
+ "$(EXTERNAL_BUILD)/contrib/lib/libavcore.a",
"$(EXTERNAL_BUILD)/contrib/lib/libdca.a",
"$(EXTERNAL_BUILD)/contrib/lib/libdvdnav.a",
"$(EXTERNAL_BUILD)/contrib/lib/libdvdread.a",
@@ -982,6 +987,7 @@
"$(EXTERNAL_BUILD)/contrib/lib/libavcodec.a",
"$(EXTERNAL_BUILD)/contrib/lib/libavformat.a",
"$(EXTERNAL_BUILD)/contrib/lib/libavutil.a",
+ "$(EXTERNAL_BUILD)/contrib/lib/libavcore.a",
"$(EXTERNAL_BUILD)/contrib/lib/libdca.a",
"$(EXTERNAL_BUILD)/contrib/lib/libdvdnav.a",
"$(EXTERNAL_BUILD)/contrib/lib/libdvdread.a",
@@ -1070,6 +1076,7 @@
"$(EXTERNAL_BUILD)/contrib/lib/libavcodec.a",
"$(EXTERNAL_BUILD)/contrib/lib/libavformat.a",
"$(EXTERNAL_BUILD)/contrib/lib/libavutil.a",
+ "$(EXTERNAL_BUILD)/contrib/lib/libavcore.a",
"$(EXTERNAL_BUILD)/contrib/lib/libdca.a",
"$(EXTERNAL_BUILD)/contrib/lib/libdvdnav.a",
"$(EXTERNAL_BUILD)/contrib/lib/libdvdread.a",
@@ -1108,6 +1115,7 @@
"$(EXTERNAL_BUILD)/contrib/lib/libavcodec.a",
"$(EXTERNAL_BUILD)/contrib/lib/libavformat.a",
"$(EXTERNAL_BUILD)/contrib/lib/libavutil.a",
+ "$(EXTERNAL_BUILD)/contrib/lib/libavcore.a",
"$(EXTERNAL_BUILD)/contrib/lib/libdca.a",
"$(EXTERNAL_BUILD)/contrib/lib/libdvdnav.a",
"$(EXTERNAL_BUILD)/contrib/lib/libdvdread.a",
@@ -1196,6 +1204,7 @@
"$(EXTERNAL_BUILD)/contrib/lib/libavcodec.a",
"$(EXTERNAL_BUILD)/contrib/lib/libavformat.a",
"$(EXTERNAL_BUILD)/contrib/lib/libavutil.a",
+ "$(EXTERNAL_BUILD)/contrib/lib/libavcore.a",
"$(EXTERNAL_BUILD)/contrib/lib/libdca.a",
"$(EXTERNAL_BUILD)/contrib/lib/libdvdnav.a",
"$(EXTERNAL_BUILD)/contrib/lib/libdvdread.a",
@@ -1234,6 +1243,7 @@
"$(EXTERNAL_BUILD)/contrib/lib/libavcodec.a",
"$(EXTERNAL_BUILD)/contrib/lib/libavformat.a",
"$(EXTERNAL_BUILD)/contrib/lib/libavutil.a",
+ "$(EXTERNAL_BUILD)/contrib/lib/libavcore.a",
"$(EXTERNAL_BUILD)/contrib/lib/libdca.a",
"$(EXTERNAL_BUILD)/contrib/lib/libdvdnav.a",
"$(EXTERNAL_BUILD)/contrib/lib/libdvdread.a",
@@ -1325,6 +1335,7 @@
"$(EXTERNAL_BUILD)/contrib/lib/libavcodec.a",
"$(EXTERNAL_BUILD)/contrib/lib/libavformat.a",
"$(EXTERNAL_BUILD)/contrib/lib/libavutil.a",
+ "$(EXTERNAL_BUILD)/contrib/lib/libavcore.a",
"$(EXTERNAL_BUILD)/contrib/lib/libdca.a",
"$(EXTERNAL_BUILD)/contrib/lib/libdvdnav.a",
"$(EXTERNAL_BUILD)/contrib/lib/libdvdread.a",
@@ -1363,6 +1374,7 @@
"$(EXTERNAL_BUILD)/contrib/lib/libavcodec.a",
"$(EXTERNAL_BUILD)/contrib/lib/libavformat.a",
"$(EXTERNAL_BUILD)/contrib/lib/libavutil.a",
+ "$(EXTERNAL_BUILD)/contrib/lib/libavcore.a",
"$(EXTERNAL_BUILD)/contrib/lib/libdca.a",
"$(EXTERNAL_BUILD)/contrib/lib/libdvdnav.a",
"$(EXTERNAL_BUILD)/contrib/lib/libdvdread.a",
@@ -1454,6 +1466,7 @@
"$(EXTERNAL_BUILD)/contrib/lib/libavcodec.a",
"$(EXTERNAL_BUILD)/contrib/lib/libavformat.a",
"$(EXTERNAL_BUILD)/contrib/lib/libavutil.a",
+ "$(EXTERNAL_BUILD)/contrib/lib/libavcore.a",
"$(EXTERNAL_BUILD)/contrib/lib/libdca.a",
"$(EXTERNAL_BUILD)/contrib/lib/libdvdnav.a",
"$(EXTERNAL_BUILD)/contrib/lib/libdvdread.a",
@@ -1492,6 +1505,7 @@
"$(EXTERNAL_BUILD)/contrib/lib/libavcodec.a",
"$(EXTERNAL_BUILD)/contrib/lib/libavformat.a",
"$(EXTERNAL_BUILD)/contrib/lib/libavutil.a",
+ "$(EXTERNAL_BUILD)/contrib/lib/libavcore.a",
"$(EXTERNAL_BUILD)/contrib/lib/libdca.a",
"$(EXTERNAL_BUILD)/contrib/lib/libdvdnav.a",
"$(EXTERNAL_BUILD)/contrib/lib/libdvdread.a",
@@ -1583,6 +1597,7 @@
"$(EXTERNAL_BUILD)/contrib/lib/libavcodec.a",
"$(EXTERNAL_BUILD)/contrib/lib/libavformat.a",
"$(EXTERNAL_BUILD)/contrib/lib/libavutil.a",
+ "$(EXTERNAL_BUILD)/contrib/lib/libavcore.a",
"$(EXTERNAL_BUILD)/contrib/lib/libdca.a",
"$(EXTERNAL_BUILD)/contrib/lib/libdvdnav.a",
"$(EXTERNAL_BUILD)/contrib/lib/libdvdread.a",
@@ -1621,6 +1636,7 @@
"$(EXTERNAL_BUILD)/contrib/lib/libavcodec.a",
"$(EXTERNAL_BUILD)/contrib/lib/libavformat.a",
"$(EXTERNAL_BUILD)/contrib/lib/libavutil.a",
+ "$(EXTERNAL_BUILD)/contrib/lib/libavcore.a",
"$(EXTERNAL_BUILD)/contrib/lib/libdca.a",
"$(EXTERNAL_BUILD)/contrib/lib/libdvdnav.a",
"$(EXTERNAL_BUILD)/contrib/lib/libdvdread.a",
@@ -1712,6 +1728,7 @@
"$(EXTERNAL_BUILD)/contrib/lib/libavcodec.a",
"$(EXTERNAL_BUILD)/contrib/lib/libavformat.a",
"$(EXTERNAL_BUILD)/contrib/lib/libavutil.a",
+ "$(EXTERNAL_BUILD)/contrib/lib/libavcore.a",
"$(EXTERNAL_BUILD)/contrib/lib/libdca.a",
"$(EXTERNAL_BUILD)/contrib/lib/libdvdnav.a",
"$(EXTERNAL_BUILD)/contrib/lib/libdvdread.a",
@@ -1750,6 +1767,7 @@
"$(EXTERNAL_BUILD)/contrib/lib/libavcodec.a",
"$(EXTERNAL_BUILD)/contrib/lib/libavformat.a",
"$(EXTERNAL_BUILD)/contrib/lib/libavutil.a",
+ "$(EXTERNAL_BUILD)/contrib/lib/libavcore.a",
"$(EXTERNAL_BUILD)/contrib/lib/libdca.a",
"$(EXTERNAL_BUILD)/contrib/lib/libdvdnav.a",
"$(EXTERNAL_BUILD)/contrib/lib/libdvdread.a",
@@ -1849,6 +1867,7 @@
"$(EXTERNAL_BUILD)/contrib/lib/libavcodec.a",
"$(EXTERNAL_BUILD)/contrib/lib/libavformat.a",
"$(EXTERNAL_BUILD)/contrib/lib/libavutil.a",
+ "$(EXTERNAL_BUILD)/contrib/lib/libavcore.a",
"$(EXTERNAL_BUILD)/contrib/lib/libdca.a",
"$(EXTERNAL_BUILD)/contrib/lib/libdvdnav.a",
"$(EXTERNAL_BUILD)/contrib/lib/libdvdread.a",
@@ -1891,6 +1910,7 @@
"$(EXTERNAL_BUILD)/contrib/lib/libavcodec.a",
"$(EXTERNAL_BUILD)/contrib/lib/libavformat.a",
"$(EXTERNAL_BUILD)/contrib/lib/libavutil.a",
+ "$(EXTERNAL_BUILD)/contrib/lib/libavcore.a",
"$(EXTERNAL_BUILD)/contrib/lib/libdca.a",
"$(EXTERNAL_BUILD)/contrib/lib/libdvdnav.a",
"$(EXTERNAL_BUILD)/contrib/lib/libdvdread.a",
diff --git a/macosx/main.mm b/macosx/main.mm
index 0d0b01a6a..260a8ad92 100644
--- a/macosx/main.mm
+++ b/macosx/main.mm
@@ -29,11 +29,6 @@ void hb_error_handler( const char *errmsg )
}
}
-extern "C" {
-extern int mm_flags;
-int mm_support();
-}
-
char * str_printf(const char *fmt, ...)
{
/* Guess we need no more than 100 bytes. */
@@ -143,7 +138,6 @@ int main( int argc, const char ** argv )
}
}
}
- mm_flags = mm_support();
signal( SIGINT, SigHandler );
hb_register_error_handler(&hb_error_handler);
return NSApplicationMain( argc, argv );
diff --git a/test/module.defs b/test/module.defs
index cd79c05c0..7dd323556 100644
--- a/test/module.defs
+++ b/test/module.defs
@@ -10,7 +10,7 @@ TEST.c.o = $(patsubst $(SRC/)%.c,$(BUILD/)%.o,$(TEST.c))
TEST.exe = $(BUILD/)$(call TARGET.exe,$(HB.name)CLI)
TEST.libs = $(LIBHB.a) $(foreach n, \
- a52 avcodec avformat avutil dca dvdnav dvdread faac faad mkv mpeg2 mp3lame mp4v2 \
+ a52 avcore avcodec avformat avutil dca dvdnav dvdread faac faad mkv mpeg2 mp3lame mp4v2 \
ogg samplerate swscale theora vorbis vorbisenc x264 bluray, \
$(CONTRIB.build/)lib/lib$(n).a )