OSDN Git Service

CLI: add iso639-2 language code to audio track information display
[handbrake-jp/handbrake-jp-git.git] / contrib / ffmpeg / A00-latm.patch
index a286f4c..b17c114 100644 (file)
@@ -1,7 +1,7 @@
-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
@@ -9,8 +9,8 @@ diff -Naur ffmpeg.orig/libavcodec/Makefile ffmpeg/libavcodec/Makefile
 +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
@@ -19,10 +19,10 @@ diff -Naur ffmpeg.orig/libavcodec/Makefile ffmpeg/libavcodec/Makefile
  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);
@@ -30,7 +30,7 @@ diff -Naur ffmpeg.orig/libavcodec/allcodecs.c ffmpeg/libavcodec/allcodecs.c
      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);
@@ -38,10 +38,10 @@ diff -Naur ffmpeg.orig/libavcodec/allcodecs.c ffmpeg/libavcodec/allcodecs.c
      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,
@@ -49,9 +49,9 @@ diff -Naur ffmpeg.orig/libavcodec/avcodec.h ffmpeg/libavcodec/avcodec.h
      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
@@ -181,9 +181,9 @@ diff -Naur ffmpeg.orig/libavcodec/latm_parser.c ffmpeg/libavcodec/latm_parser.c
 +    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>
@@ -217,7 +217,8 @@ diff -Naur ffmpeg.orig/libavcodec/latmaac.c ffmpeg/libavcodec/latmaac.c
 +#include <sys/types.h>
 +
 +#include "parser.h"
-+#include "bitstream.h"
++#include "get_bits.h"
++#include "put_bits.h"
 +#include "mpeg4audio.h"
 +#include "neaacdec.h"
 +
@@ -778,13 +779,13 @@ diff -Naur ffmpeg.orig/libavcodec/latmaac.c ffmpeg/libavcodec/latmaac.c
 +
 +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;
 +}
@@ -808,11 +809,10 @@ diff -Naur ffmpeg.orig/libavcodec/latmaac.c ffmpeg/libavcodec/latmaac.c
 +    .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) ||
@@ -821,7 +821,7 @@ diff -Naur ffmpeg.orig/libavformat/mpeg.c ffmpeg/libavformat/mpeg.c
          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;
@@ -831,9 +831,9 @@ diff -Naur ffmpeg.orig/libavformat/mpeg.c ffmpeg/libavformat/mpeg.c
          } 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
@@ -842,41 +842,30 @@ diff -Naur ffmpeg.orig/libavformat/mpeg.h ffmpeg/libavformat/mpeg.h
  #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