diff -rc --exclude=.svn --exclude=ffmpeg HandBrake-0.9.3.orig/contrib/Jamfile HandBrake-0.9.3/contrib/Jamfile *** HandBrake-0.9.3.orig/contrib/Jamfile 2008-10-28 08:29:19.000000000 +0900 --- HandBrake-0.9.3/contrib/Jamfile 2009-04-29 19:54:20.000000000 +0900 *************** *** 77,85 **** # libavcodec rule LibAvCodec { ! FFMPEG_PATCH = "$(PATCH) -p0 < ../patch-ffmpeg.patch" ; ! FFMPEG_PATCH += " && $(PATCH) -p0 < ../patch-ffmpeg-latm.patch " ; ! FFMPEG_PATCH += " && $(PATCH) -p0 < ../patch-ffmpeg-mpegleak.patch " ; if $(OS) = CYGWIN { FFMPEG_PATCH += " && $(PATCH) -p1 < ../patch-ffmpeg-cygwin.patch " ; --- 77,83 ---- # libavcodec rule LibAvCodec { ! FFMPEG_PATCH = "$(PATCH) -p1 < ../patch-ffmpeg.patch" ; if $(OS) = CYGWIN { FFMPEG_PATCH += " && $(PATCH) -p1 < ../patch-ffmpeg-cygwin.patch " ; *************** *** 99,124 **** FFMPEG_EXTRA_OPTIONS = "--disable-vis --disable-demuxer=mpc8 --disable-vhook --disable-network" ; } - Depends $(<) : $(>) ; Depends lib : $(<) ; } actions LibAvCodec { cd `dirname $(>)` && CONTRIB=`pwd` && ! rm -rf ffmpeg && (gzip -dc ffmpeg.tar.gz | tar xf -) && cd ffmpeg && $(FFMPEG_PATCH) && ! ./configure --prefix=$CONTRIB --enable-gpl --enable-pthreads --enable-swscale \ --disable-shared --enable-static --disable-encoders \ --enable-encoder=mpeg4 --enable-encoder=ac3 --enable-encoder=snow \ --enable-libfaad --disable-ffmpeg --disable-ffserver \ ! --disable-muxers --enable-muxer=ipod --disable-bsfs \ --extra-cflags="-I$CONTRIB/include" \ --extra-ldflags="-L$CONTRIB/lib" $(FFMPEG_EXTRA_OPTIONS) && $(MAKE) && $(MAKE) install && $(STRIP) $CONTRIB/lib/libavcodec.a } ! Wget $(SUBDIR)/ffmpeg.tar.gz : $(SUBDIR)/version_ffmpeg.txt ; ! LibAvCodec $(SUBDIR)/lib/libavcodec.a : $(SUBDIR)/ffmpeg.tar.gz ; rule LibAvUtil { --- 97,120 ---- FFMPEG_EXTRA_OPTIONS = "--disable-vis --disable-demuxer=mpc8 --disable-vhook --disable-network" ; } Depends lib : $(<) ; } actions LibAvCodec { cd `dirname $(>)` && CONTRIB=`pwd` && ! rm -rf ffmpeg && svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg && cd ffmpeg && $(FFMPEG_PATCH) && ! ./configure --prefix=$CONTRIB --enable-gpl --enable-pthreads \ --disable-shared --enable-static --disable-encoders \ --enable-encoder=mpeg4 --enable-encoder=ac3 --enable-encoder=snow \ --enable-libfaad --disable-ffmpeg --disable-ffserver \ ! --disable-muxers --enable-muxer=ipod --enable-muxer=rtp --disable-bsfs \ --extra-cflags="-I$CONTRIB/include" \ --extra-ldflags="-L$CONTRIB/lib" $(FFMPEG_EXTRA_OPTIONS) && $(MAKE) && $(MAKE) install && $(STRIP) $CONTRIB/lib/libavcodec.a } ! LibAvCodec $(SUBDIR)/lib/libavcodec.a : $(SUBDIR)/ffmpeg ; rule LibAvUtil { diff -rc --exclude=.svn --exclude=ffmpeg HandBrake-0.9.3.orig/contrib/patch-ffmpeg.patch HandBrake-0.9.3/contrib/patch-ffmpeg.patch *** HandBrake-0.9.3.orig/contrib/patch-ffmpeg.patch 2008-06-01 02:00:42.000000000 +0900 --- HandBrake-0.9.3/contrib/patch-ffmpeg.patch 2009-04-29 19:11:45.000000000 +0900 *************** *** 1,18 **** ! Index: libavformat/tcp.c ! =================================================================== ! --- libavformat/tcp.c (revision 9814) ! +++ libavformat/tcp.c (working copy) ! @@ -88,11 +88,13 @@ ! break; ! } ! ! +#ifndef __BEOS__ ! /* test error */ ! optlen = sizeof(ret); ! getsockopt (fd, SOL_SOCKET, SO_ERROR, &ret, &optlen); ! if (ret != 0) ! goto fail; ! +#endif ! } ! s->fd = fd; ! return 0; --- 1,133 ---- ! diff -rc --exclude=.svn ffmpeg.orig/libavcodec/avcodec.h ffmpeg/libavcodec/avcodec.h ! *** ffmpeg.orig/libavcodec/avcodec.h 2009-04-29 18:50:01.000000000 +0900 ! --- ffmpeg/libavcodec/avcodec.h 2009-04-29 18:54:34.000000000 +0900 ! *************** ! *** 269,274 **** ! --- 269,275 ---- ! 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, ! diff -rc --exclude=.svn ffmpeg.orig/libavformat/mpeg.c ffmpeg/libavformat/mpeg.c ! *** ffmpeg.orig/libavformat/mpeg.c 2009-04-29 18:50:03.000000000 +0900 ! --- ffmpeg/libavformat/mpeg.c 2009-04-29 18:54:34.000000000 +0900 ! *************** ! *** 279,285 **** ! /* find matching stream */ ! if (!((startcode >= 0x1c0 && startcode <= 0x1df) || ! (startcode >= 0x1e0 && startcode <= 0x1ef) || ! ! (startcode == 0x1bd) || (startcode == 0x1fd))) ! goto redo; ! if (ppos) { ! *ppos = url_ftell(s->pb) - 4; ! --- 279,285 ---- ! /* find matching stream */ ! if (!((startcode >= 0x1c0 && startcode <= 0x1df) || ! (startcode >= 0x1e0 && startcode <= 0x1ef) || ! ! (startcode == 0x1bd) || (startcode == 0x1fa) || (startcode == 0x1fd))) ! goto redo; ! if (ppos) { ! *ppos = url_ftell(s->pb) - 4; ! *************** ! *** 446,451 **** ! --- 446,454 ---- ! } else if(es_type == STREAM_TYPE_AUDIO_AAC){ ! codec_id = CODEC_ID_AAC; ! type = CODEC_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 = CODEC_TYPE_VIDEO; ! diff -rc --exclude=.svn ffmpeg.orig/libavformat/mpeg.h ffmpeg/libavformat/mpeg.h ! *** ffmpeg.orig/libavformat/mpeg.h 2009-04-29 18:50:03.000000000 +0900 ! --- ffmpeg/libavformat/mpeg.h 2009-04-29 18:54:34.000000000 +0900 ! *************** ! *** 53,58 **** ! --- 53,59 ---- ! #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 -rc --exclude=.svn ffmpeg.orig/libavformat/mpegts.c ffmpeg/libavformat/mpegts.c ! *** ffmpeg.orig/libavformat/mpegts.c 2009-04-29 18:50:03.000000000 +0900 ! --- ffmpeg/libavformat/mpegts.c 2009-04-29 18:54:34.000000000 +0900 ! *************** ! *** 625,630 **** ! --- 625,631 ---- ! 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: ! *************** ! *** 839,845 **** ! if (!pes->st || ! !((code >= 0x1c0 && code <= 0x1df) || ! (code >= 0x1e0 && code <= 0x1ef) || ! ! (code == 0x1bd) || (code == 0x1fd))) ! goto skip; ! pes->state = MPEGTS_PESHEADER_FILL; ! pes->total_size = AV_RB16(pes->header + 4); ! --- 840,846 ---- ! if (!pes->st || ! !((code >= 0x1c0 && code <= 0x1df) || ! (code >= 0x1e0 && code <= 0x1ef) || ! ! (code == 0x1bd) || (code == 0x1fa) || (code == 0x1fd))) ! goto skip; ! pes->state = MPEGTS_PESHEADER_FILL; ! pes->total_size = AV_RB16(pes->header + 4); ! *************** ! *** 958,963 **** ! --- 959,968 ---- ! 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 -rc --exclude=.svn ffmpeg.orig/libavformat/mpegts.h ffmpeg/libavformat/mpegts.h ! *** ffmpeg.orig/libavformat/mpegts.h 2009-04-29 18:50:03.000000000 +0900 ! --- ffmpeg/libavformat/mpegts.h 2009-04-29 18:54:34.000000000 +0900 ! *************** ! *** 50,55 **** ! --- 50,56 ---- ! #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 ! diff -rc --exclude=.svn ffmpeg.orig/libavformat/tcp.c ffmpeg/libavformat/tcp.c ! *** ffmpeg.orig/libavformat/tcp.c 2009-04-29 18:50:03.000000000 +0900 ! --- ffmpeg/libavformat/tcp.c 2009-04-29 18:51:42.000000000 +0900 ! *************** ! *** 87,97 **** ! --- 87,99 ---- ! break; ! } ! ! + #ifndef __BEOS__ ! /* test error */ ! optlen = sizeof(ret); ! getsockopt (fd, SOL_SOCKET, SO_ERROR, &ret, &optlen); ! if (ret != 0) ! goto fail; ! + #endif ! } ! s = av_malloc(sizeof(TCPContext)); ! if (!s) diff -rc --exclude=.svn --exclude=ffmpeg HandBrake-0.9.3.orig/libhb/hb.c HandBrake-0.9.3/libhb/hb.c *** HandBrake-0.9.3.orig/libhb/hb.c 2008-11-07 09:22:48.000000000 +0900 --- HandBrake-0.9.3/libhb/hb.c 2009-04-29 14:12:14.000000000 +0900 *************** *** 4,9 **** --- 4,12 ---- #include "libavformat/avformat.h" #include "libswscale/swscale.h" + #define PIX_FMT_RGBA32 PIX_FMT_RGB32 + #define PIX_FMT_YUV422 PIX_FMT_YUYV422 + struct hb_handle_s { /* The "Check for update" thread */ diff -rc --exclude=.svn --exclude=ffmpeg HandBrake-0.9.3.orig/libhb/stream.c HandBrake-0.9.3/libhb/stream.c *** HandBrake-0.9.3.orig/libhb/stream.c 2008-11-19 13:13:11.000000000 +0900 --- HandBrake-0.9.3/libhb/stream.c 2009-04-29 14:12:59.000000000 +0900 *************** *** 55,61 **** st(0x0e, U, 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"), ! st(0x11, A, HB_ACODEC_MPGA, CODEC_ID_AAC_LATM, "MPEG4 LATM AAC"), st(0x12, U, 0, 0, "MPEG4 generic"), st(0x14, U, 0, 0, "ISO 13818-6 DSM-CC download"), --- 55,61 ---- st(0x0e, U, 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"), ! //st(0x11, A, HB_ACODEC_MPGA, CODEC_ID_AAC_LATM, "MPEG4 LATM AAC"), st(0x12, U, 0, 0, "MPEG4 generic"), st(0x14, U, 0, 0, "ISO 13818-6 DSM-CC download"),