-diff -Naur ffmpeg.orig/libavcodec/Makefile ffmpeg/libavcodec/Makefile
---- ffmpeg.orig/libavcodec/Makefile 2008-12-01 01:40:36.000000000 -0500
-+++ ffmpeg/libavcodec/Makefile 2009-02-21 08:25:13.000000000 -0500
-@@ -338,7 +338,7 @@
+diff -Naur ffmpeg-r19067.orig/libavcodec/Makefile ffmpeg-r19067/libavcodec/Makefile
+--- ffmpeg-r19067.orig/libavcodec/Makefile 2009-05-25 18:19:35.000000000 -0400
++++ ffmpeg-r19067/libavcodec/Makefile 2009-06-01 12:39:48.000000000 -0400
+@@ -382,7 +382,7 @@
OBJS-$(CONFIG_LIBDIRAC_DECODER) += libdiracdec.o
OBJS-$(CONFIG_LIBDIRAC_ENCODER) += libdiracenc.o libdirac_libschro.o
OBJS-$(CONFIG_LIBFAAC) += libfaac.o
+OBJS-$(CONFIG_LIBFAAD) += libfaad.o latmaac.o
OBJS-$(CONFIG_LIBGSM) += libgsm.o
OBJS-$(CONFIG_LIBMP3LAME) += libmp3lame.o
- OBJS-$(CONFIG_LIBSCHROEDINGER_DECODER) += libschroedingerdec.o libschroedinger.o libdirac_libschro.o
-@@ -350,7 +350,7 @@
+ OBJS-$(CONFIG_LIBOPENJPEG) += libopenjpeg.o
+@@ -395,7 +395,7 @@
OBJS-$(CONFIG_LIBXVID) += libxvidff.o libxvid_rc.o
# parsers
OBJS-$(CONFIG_AC3_PARSER) += ac3_parser.o ac3tab.o aac_ac3_parser.o
OBJS-$(CONFIG_CAVSVIDEO_PARSER) += cavs_parser.o
OBJS-$(CONFIG_DCA_PARSER) += dca_parser.o
-diff -Naur ffmpeg.orig/libavcodec/allcodecs.c ffmpeg/libavcodec/allcodecs.c
---- ffmpeg.orig/libavcodec/allcodecs.c 2008-12-01 01:40:36.000000000 -0500
-+++ ffmpeg/libavcodec/allcodecs.c 2009-02-21 08:25:13.000000000 -0500
-@@ -291,6 +291,7 @@
+diff -Naur ffmpeg-r19067.orig/libavcodec/allcodecs.c ffmpeg-r19067/libavcodec/allcodecs.c
+--- ffmpeg-r19067.orig/libavcodec/allcodecs.c 2009-05-12 15:56:48.000000000 -0400
++++ ffmpeg-r19067/libavcodec/allcodecs.c 2009-06-01 12:39:48.000000000 -0400
+@@ -306,6 +306,7 @@
REGISTER_ENCDEC (LIBDIRAC, libdirac);
REGISTER_ENCODER (LIBFAAC, libfaac);
REGISTER_DECODER (LIBFAAD, libfaad);
REGISTER_ENCDEC (LIBGSM, libgsm);
REGISTER_ENCDEC (LIBGSM_MS, libgsm_ms);
REGISTER_ENCODER (LIBMP3LAME, libmp3lame);
-@@ -303,6 +304,7 @@
+@@ -319,6 +320,7 @@
/* parsers */
REGISTER_PARSER (AAC, aac);
REGISTER_PARSER (AC3, ac3);
REGISTER_PARSER (CAVSVIDEO, cavsvideo);
REGISTER_PARSER (DCA, dca);
-diff -Naur ffmpeg.orig/libavcodec/avcodec.h ffmpeg/libavcodec/avcodec.h
---- ffmpeg.orig/libavcodec/avcodec.h 2008-12-01 01:40:36.000000000 -0500
-+++ ffmpeg/libavcodec/avcodec.h 2009-02-21 08:25:13.000000000 -0500
-@@ -264,6 +264,7 @@
+diff -Naur ffmpeg-r19067.orig/libavcodec/avcodec.h ffmpeg-r19067/libavcodec/avcodec.h
+--- ffmpeg-r19067.orig/libavcodec/avcodec.h 2009-05-31 02:51:18.000000000 -0400
++++ ffmpeg-r19067/libavcodec/avcodec.h 2009-06-01 12:39:48.000000000 -0400
+@@ -271,6 +271,7 @@
CODEC_ID_MP2= 0x15000,
CODEC_ID_MP3, ///< preferred ID for decoding MPEG audio layer 1, 2 or 3
CODEC_ID_AAC,
CODEC_ID_AC3,
CODEC_ID_DTS,
CODEC_ID_VORBIS,
-diff -Naur ffmpeg.orig/libavcodec/latm_parser.c ffmpeg/libavcodec/latm_parser.c
---- ffmpeg.orig/libavcodec/latm_parser.c 1969-12-31 19:00:00.000000000 -0500
-+++ ffmpeg/libavcodec/latm_parser.c 2009-02-21 08:25:13.000000000 -0500
+diff -Naur ffmpeg-r19067.orig/libavcodec/latm_parser.c ffmpeg-r19067/libavcodec/latm_parser.c
+--- ffmpeg-r19067.orig/libavcodec/latm_parser.c 1969-12-31 19:00:00.000000000 -0500
++++ ffmpeg-r19067/libavcodec/latm_parser.c 2009-06-01 12:39:48.000000000 -0400
@@ -0,0 +1,128 @@
+/*
+ * LATM parser
+ ff_parse_close,
+ latm_split,
+};
-diff -Naur ffmpeg.orig/libavcodec/latmaac.c ffmpeg/libavcodec/latmaac.c
---- ffmpeg.orig/libavcodec/latmaac.c 1969-12-31 19:00:00.000000000 -0500
-+++ ffmpeg/libavcodec/latmaac.c 2009-02-21 08:25:13.000000000 -0500
+diff -Naur ffmpeg-r19067.orig/libavcodec/latmaac.c ffmpeg-r19067/libavcodec/latmaac.c
+--- ffmpeg-r19067.orig/libavcodec/latmaac.c 1969-12-31 19:00:00.000000000 -0500
++++ ffmpeg-r19067/libavcodec/latmaac.c 2009-06-01 12:39:48.000000000 -0400
@@ -0,0 +1,624 @@
+/*
+ * copyright (c) 2008 Paul Kendall <paul@kcbbs.gen.nz>
+#include <sys/types.h>
+
+#include "parser.h"
-+#include "bitstream.h"
++#include "get_bits.h"
++#include "put_bits.h"
+#include "mpeg4audio.h"
+#include "neaacdec.h"
+
+
+static int faac_decode_frame(AVCodecContext *avctx,
+ void *data, int *data_size,
-+ uint8_t *buf, int buf_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, buf, buf_size);
++ 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;
+}
+ .decode = faac_decode_frame,
+ .long_name = "AAC over LATM",
+};
-+
-diff -Naur ffmpeg.orig/libavformat/mpeg.c ffmpeg/libavformat/mpeg.c
---- ffmpeg.orig/libavformat/mpeg.c 2008-10-02 12:03:00.000000000 -0400
-+++ ffmpeg/libavformat/mpeg.c 2009-02-21 08:25:13.000000000 -0500
-@@ -281,7 +281,7 @@
+diff -Naur ffmpeg-r19067.orig/libavformat/mpeg.c ffmpeg-r19067/libavformat/mpeg.c
+--- ffmpeg-r19067.orig/libavformat/mpeg.c 2009-04-17 14:08:39.000000000 -0400
++++ ffmpeg-r19067/libavformat/mpeg.c 2009-06-01 12:39:48.000000000 -0400
+@@ -279,7 +279,7 @@
/* find matching stream */
if (!((startcode >= 0x1c0 && startcode <= 0x1df) ||
(startcode >= 0x1e0 && startcode <= 0x1ef) ||
goto redo;
if (ppos) {
*ppos = url_ftell(s->pb) - 4;
-@@ -441,6 +441,9 @@
+@@ -446,6 +446,9 @@
} else if(es_type == STREAM_TYPE_AUDIO_AAC){
codec_id = CODEC_ID_AAC;
type = CODEC_TYPE_AUDIO;
} else if(es_type == STREAM_TYPE_VIDEO_MPEG4){
codec_id = CODEC_ID_MPEG4;
type = CODEC_TYPE_VIDEO;
-diff -Naur ffmpeg.orig/libavformat/mpeg.h ffmpeg/libavformat/mpeg.h
---- ffmpeg.orig/libavformat/mpeg.h 2008-08-31 03:39:47.000000000 -0400
-+++ ffmpeg/libavformat/mpeg.h 2009-02-21 08:25:13.000000000 -0500
+diff -Naur ffmpeg-r19067.orig/libavformat/mpeg.h ffmpeg-r19067/libavformat/mpeg.h
+--- ffmpeg-r19067.orig/libavformat/mpeg.h 2009-01-19 10:46:40.000000000 -0500
++++ ffmpeg-r19067/libavformat/mpeg.h 2009-06-01 12:39:48.000000000 -0400
@@ -53,6 +53,7 @@
#define STREAM_TYPE_PRIVATE_DATA 0x06
#define STREAM_TYPE_AUDIO_AAC 0x0f
#define STREAM_TYPE_VIDEO_H264 0x1b
#define STREAM_TYPE_AUDIO_AC3 0x81
-diff -Naur ffmpeg.orig/libavformat/mpegts.c ffmpeg/libavformat/mpegts.c
---- ffmpeg.orig/libavformat/mpegts.c 2008-10-02 12:28:58.000000000 -0400
-+++ ffmpeg/libavformat/mpegts.c 2009-02-21 08:25:13.000000000 -0500
-@@ -625,6 +625,7 @@
- case STREAM_TYPE_VIDEO_VC1:
- case STREAM_TYPE_VIDEO_DIRAC:
- case STREAM_TYPE_AUDIO_AAC:
-+ case STREAM_TYPE_AUDIO_AAC_LATM:
- case STREAM_TYPE_AUDIO_AC3:
- case STREAM_TYPE_AUDIO_DTS:
- case STREAM_TYPE_AUDIO_HDMV_DTS:
-@@ -847,7 +848,7 @@
- code = pes->header[3] | 0x100;
- if (!((code >= 0x1c0 && code <= 0x1df) ||
+diff -Naur ffmpeg-r19067.orig/libavformat/mpegts.c ffmpeg-r19067/libavformat/mpegts.c
+--- ffmpeg-r19067.orig/libavformat/mpegts.c 2009-05-31 04:47:40.000000000 -0400
++++ ffmpeg-r19067/libavformat/mpegts.c 2009-06-01 12:39:48.000000000 -0400
+@@ -495,6 +495,7 @@
+ { 0x04, CODEC_TYPE_AUDIO, CODEC_ID_MP3 },
+ { 0x0f, CODEC_TYPE_AUDIO, CODEC_ID_AAC },
+ { 0x10, CODEC_TYPE_VIDEO, CODEC_ID_MPEG4 },
++ { 0x11, CODEC_TYPE_AUDIO, CODEC_ID_AAC_LATM },
+ { 0x1b, CODEC_TYPE_VIDEO, CODEC_ID_H264 },
+ { 0xd1, CODEC_TYPE_VIDEO, CODEC_ID_DIRAC },
+ { 0xea, CODEC_TYPE_VIDEO, CODEC_ID_VC1 },
+@@ -933,7 +934,7 @@
+ if (pes->st->discard == AVDISCARD_ALL ||
+ !((code >= 0x1c0 && code <= 0x1df) ||
(code >= 0x1e0 && code <= 0x1ef) ||
- (code == 0x1bd) || (code == 0x1fd)))
+ (code == 0x1bd) || (code == 0x1fa) || (code == 0x1fd)))
goto skip;
- if (!pes->st) {
- /* allocate stream */
-@@ -968,6 +969,10 @@
- codec_type = CODEC_TYPE_AUDIO;
- codec_id = CODEC_ID_AAC;
- break;
-+ case STREAM_TYPE_AUDIO_AAC_LATM:
-+ codec_type = CODEC_TYPE_AUDIO;
-+ codec_id = CODEC_ID_AAC_LATM;
-+ break;
- case STREAM_TYPE_AUDIO_AC3:
- codec_type = CODEC_TYPE_AUDIO;
- codec_id = CODEC_ID_AC3;
-diff -Naur ffmpeg.orig/libavformat/mpegts.h ffmpeg/libavformat/mpegts.h
---- ffmpeg.orig/libavformat/mpegts.h 2008-08-31 03:39:47.000000000 -0400
-+++ ffmpeg/libavformat/mpegts.h 2009-02-21 08:25:13.000000000 -0500
-@@ -50,6 +50,7 @@
+ pes->state = MPEGTS_PESHEADER_FILL;
+ pes->total_size = AV_RB16(pes->header + 4);
+diff -Naur ffmpeg-r19067.orig/libavformat/mpegts.h ffmpeg-r19067/libavformat/mpegts.h
+--- ffmpeg-r19067.orig/libavformat/mpegts.h 2009-05-30 23:02:12.000000000 -0400
++++ ffmpeg-r19067/libavformat/mpegts.h 2009-06-01 12:39:48.000000000 -0400
+@@ -47,6 +47,7 @@
#define STREAM_TYPE_PRIVATE_DATA 0x06
#define STREAM_TYPE_AUDIO_AAC 0x0f
#define STREAM_TYPE_VIDEO_MPEG4 0x10
buf1 = av_malloc( avpicture_get_size( PIX_FMT_YUV420P, title->width, title->height ) );
buf2 = av_malloc( avpicture_get_size( PIX_FMT_YUV420P, title->width, title->height ) );
buf3 = av_malloc( avpicture_get_size( PIX_FMT_YUV420P, rgb_width, job->height ) );
- buf4 = av_malloc( avpicture_get_size( PIX_FMT_RGBA32, rgb_width, job->height ) );
+ buf4 = av_malloc( avpicture_get_size( PIX_FMT_RGB32, rgb_width, job->height ) );
avpicture_fill( &pic_in, buf1, PIX_FMT_YUV420P,
title->width, title->height );
avpicture_fill( &pic_deint, buf2, PIX_FMT_YUV420P,
title->width, title->height );
avpicture_fill( &pic_scale, buf3, PIX_FMT_YUV420P,
rgb_width, job->height );
- avpicture_fill( &pic_preview, buf4, PIX_FMT_RGBA32,
+ avpicture_fill( &pic_preview, buf4, PIX_FMT_RGB32,
rgb_width, job->height );
// Allocate the AVPicture frames and fill in
// Get preview context
context = sws_getContext(rgb_width, job->height, PIX_FMT_YUV420P,
- rgb_width, job->height, PIX_FMT_RGBA32,
+ rgb_width, job->height, PIX_FMT_RGB32,
swsflags, NULL, NULL, NULL);
// Create preview