Merge commit 'ef1b23ad21e3f12fc4ff2a73a6d4d4cd9d630c4b'
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 13 Nov 2012 09:55:07 +0000 (10:55 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 13 Nov 2012 09:55:07 +0000 (10:55 +0100)
* commit 'ef1b23ad21e3f12fc4ff2a73a6d4d4cd9d630c4b': (21 commits)
  jvdec: set channel layout
  iss: set channel layout
  ipmovie: set channel layout
  iff: set channel layout
  idroqdec: set channel layout
  gxfdec: set channel layout when applicable
  gsmdec: set channel layout
  flvdec: set channel layout
  dv: set channel layout
  dsicin: set channel layout
  daud: set channel layout
  cdxl: set channel layout
  bmv: set channel layout
  bink: set channel layout
  bfi: set channel layout
  bethsoftvid: set channel layout
  apc: set channel layout
  amr: set channel_layout
  ppc: replace pointer casting with AV_COPY32
  ppc: fix some unused variable warnings
  ...

Conflicts:
libavformat/amr.c
libavformat/iff.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
20 files changed:
1  2 
configure
libavcodec/ppc/h264_altivec.c
libavcodec/ppc/h264_altivec_template.c
libavformat/amr.c
libavformat/apc.c
libavformat/bethsoftvid.c
libavformat/bfi.c
libavformat/bink.c
libavformat/cdxl.c
libavformat/daud.c
libavformat/dsicin.c
libavformat/dv.c
libavformat/flvdec.c
libavformat/gsmdec.c
libavformat/gxf.c
libavformat/idroqdec.c
libavformat/iff.c
libavformat/ipmovie.c
libavformat/iss.c
libavformat/jvdec.c

diff --cc configure
Simple merge
Simple merge
@@@ -25,7 -25,8 +25,9 @@@ Write and read amr data according to RF
  Only mono files are supported.
  
  */
 +#include "libavutil/avassert.h"
+ #include "libavutil/channel_layout.h"
  #include "avformat.h"
  #include "internal.h"
  
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
   * Lesser General Public License for more details.
   *
   * You should have received a copy of the GNU Lesser General Public
 - * License along with Libav; if not, write to the Free Software
 + * License along with FFmpeg; if not, write to the Free Software
   * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
   */
+ #include "libavutil/channel_layout.h"
  #include "avformat.h"
  
  static int daud_header(AVFormatContext *s) {
Simple merge
  #include "internal.h"
  #include "libavcodec/dv_profile.h"
  #include "libavcodec/dvdata.h"
+ #include "libavutil/channel_layout.h"
  #include "libavutil/intreadwrite.h"
  #include "libavutil/mathematics.h"
 +#include "libavutil/timecode.h"
  #include "dv.h"
 +#include "libavutil/avassert.h"
  
  struct DVDemuxContext {
      const DVprofile*  sys;    /* Current DV profile. E.g.: 525/60, 625/50 */
@@@ -821,9 -794,10 +824,10 @@@ retry_duration
                  return ret;
              if (st->codec->codec_id == AV_CODEC_ID_AAC) {
                  MPEG4AudioConfig cfg;
 -                avpriv_mpeg4audio_get_config(&cfg, st->codec->extradata,
 -                                             st->codec->extradata_size * 8, 1);
 +                if (avpriv_mpeg4audio_get_config(&cfg, st->codec->extradata,
 +                                             st->codec->extradata_size * 8, 1) >= 0) {
                  st->codec->channels = cfg.channels;
+                 st->codec->channel_layout = 0;
                  if (cfg.ext_sample_rate)
                      st->codec->sample_rate = cfg.ext_sample_rate;
                  else
Simple merge
Simple merge
Simple merge
   * http://wiki.multimedia.cx/index.php?title=IFF
   */
  
- #include "libavcodec/bytestream.h"
 +#include "libavutil/avassert.h"
+ #include "libavutil/channel_layout.h"
  #include "libavutil/intreadwrite.h"
  #include "libavutil/dict.h"
++#include "libavcodec/bytestream.h"
  #include "avformat.h"
  #include "internal.h"
  
@@@ -191,21 -156,21 +193,27 @@@ static int iff_read_header(AVFormatCont
          case ID_CHAN:
              if (data_size < 4)
                  return AVERROR_INVALIDDATA;
-             st->codec->channels = (avio_rb32(pb) < 6) ? 1 : 2;
+             if (avio_rb32(pb) < 6) {
+                 st->codec->channels       = 1;
+                 st->codec->channel_layout = AV_CH_LAYOUT_MONO;
+             } else {
+                 st->codec->channels       = 2;
+                 st->codec->channel_layout = AV_CH_LAYOUT_STEREO;
+             }
              break;
  
 +        case ID_CAMG:
 +            if (data_size < 4)
 +                return AVERROR_INVALIDDATA;
 +            screenmode                = avio_rb32(pb);
 +            break;
 +
          case ID_CMAP:
 -            st->codec->extradata_size = data_size;
 -            st->codec->extradata      = av_malloc(data_size);
 +            st->codec->extradata_size = data_size + IFF_EXTRA_VIDEO_SIZE;
 +            st->codec->extradata      = av_malloc(data_size + IFF_EXTRA_VIDEO_SIZE + FF_INPUT_BUFFER_PADDING_SIZE);
              if (!st->codec->extradata)
                  return AVERROR(ENOMEM);
 -            if (avio_read(pb, st->codec->extradata, data_size) < 0)
 +            if (avio_read(pb, st->codec->extradata + IFF_EXTRA_VIDEO_SIZE, data_size) < 0)
                  return AVERROR(EIO);
              break;
  
Simple merge
Simple merge
Simple merge