Merge remote-tracking branch 'qatar/master'
authorMichael Niedermayer <michaelni@gmx.at>
Wed, 25 Apr 2012 20:01:59 +0000 (22:01 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 25 Apr 2012 21:17:41 +0000 (23:17 +0200)
* qatar/master:
  FATE: use updated reference for aac-latm_stereo_to_51
  avconv: use libavresample
  Add libavresample
  FATE: avoid channel mixing in lavf-dv_fmt

Conflicts:
Changelog
Makefile
cmdutils.c
configure
doc/APIchanges
ffmpeg.c
tests/lavf-regression.sh
tests/ref/lavf/dv_fmt
tests/ref/seek/lavf_dv

Merged-by: Michael Niedermayer <michaelni@gmx.at>
12 files changed:
1  2 
Changelog
Makefile
cmdutils.c
common.mak
configure
doc/APIchanges
ffmpeg.c
libavresample/utils.c
libavutil/x86/x86util.asm
tests/fate/aac.mak
tests/lavf-regression.sh
tests/ref/lavf/dv_fmt

diff --cc Changelog
+++ b/Changelog
@@@ -1,79 -1,45 +1,80 @@@
  Entries are sorted chronologically from oldest to youngest within each release,
  releases are sorted from youngest to oldest.
  
 -version <next>:
 -
 -- XWD encoder and decoder
 -- Support for fragmentation in the mov/mp4 muxer
 -- ISMV (Smooth Streaming) muxer
 +version next:
 +- v408 Quicktime and Microsoft AYUV Uncompressed 4:4:4:4 encoder and decoder
 +- setfield filter
  - CDXL demuxer and decoder
  - Apple ProRes encoder
 +- ffprobe -count_packets and -count_frames options
  - Sun Rasterfile Encoder
 -- remove libpostproc
  - ID3v2 attached pictures reading and writing
  - WMA Lossless decoder
 -- XBM encoder
 +- bluray protocol
 +- blackdetect filter
 +- libutvideo encoder wrapper (--enable-libutvideo)
 +- swapuv filter
 +- bbox filter
 +- XBM encoder and decoder
  - RealAudio Lossless decoder
  - ZeroCodec decoder
 -- drop support for avconv without libavfilter
 -- add libavresample audio conversion library
 -
 -
 -version 0.8:
 -
 +- tile video filter
 +- Metal Gear Solid: The Twin Snakes demuxer
 +- OpenEXR image decoder
 +- removelogo filter
 +- drop support for ffmpeg without libavfilter
 +- drawtext video filter: fontconfig support
 +- ffmpeg -benchmark_all option
 +- super2xsai filter ported from libmpcodecs
++- add libavresample audio conversion library for compatibility
 +
 +
 +version 0.10:
 +- Fixes: CVE-2011-3929, CVE-2011-3934, CVE-2011-3935, CVE-2011-3936,
 +         CVE-2011-3937, CVE-2011-3940, CVE-2011-3941, CVE-2011-3944,
 +         CVE-2011-3945, CVE-2011-3946, CVE-2011-3947, CVE-2011-3949,
 +         CVE-2011-3950, CVE-2011-3951, CVE-2011-3952
 +- v410 Quicktime Uncompressed 4:4:4 10-bit encoder and decoder
 +- SBaGen (SBG) binaural beats script demuxer
 +- OpenMG Audio muxer
 +- Timecode extraction in DV and MOV
 +- thumbnail video filter
 +- XML output in ffprobe
 +- asplit audio filter
 +- tinterlace video filter
 +- astreamsync audio filter
 +- amerge audio filter
 +- ISMV (Smooth Streaming) muxer
  - GSM audio parser
  - SMJPEG muxer
 -
 -
 -version 0.8_beta2:
 -
 +- XWD encoder and decoder
  - Automatic thread count based on detection number of (available) CPU cores
 -- Deprecate libpostproc. If desired, the switch --enable-postproc will
 -  enable it but it may be removed in a later Libav release.
 +- y41p Brooktree Uncompressed 4:1:1 12-bit encoder and decoder
 +- ffprobe -show_error option
 +- Avid 1:1 10-bit RGB Packer codec
 +- v308 Quicktime Uncompressed 4:4:4 encoder and decoder
 +- yuv4 libquicktime packed 4:2:0 encoder and decoder
 +- ffprobe -show_frames option
 +- silencedetect audio filter
 +- ffprobe -show_program_version, -show_library_versions, -show_versions options
  - rv34: frame-level multi-threading
  - optimized iMDCT transform on x86 using SSE for for mpegaudiodec
 +- Improved PGS subtitle decoder
 +- dumpgraph option to lavfi device
 +- r210 and r10k encoders
 +- ffwavesynth decoder
 +- aviocat tool
 +- ffeval tool
  
  
 -version 0.8_beta1:
 +version 0.9:
  
 +- openal input device added
 +- boxblur filter added
  - BWF muxer
  - Flash Screen Video 2 decoder
 -- ffplay/ffprobe/ffserver renamed to avplay/avprobe/avserver
 -- ffmpeg deprecated, added avconv, which is almost the same for now, except
 +- lavfi input device added
 +- added avconv, which is almost the same for now, except
  for a few incompatible changes in the options, which will hopefully make them
  easier to use. The changes are:
      * The options placement is now strictly enforced! While in theory the
diff --cc Makefile
+++ b/Makefile
@@@ -31,9 -71,8 +31,10 @@@ ALLMANPAGES = $(BASENAMES:%=%.1
  FFLIBS-$(CONFIG_AVDEVICE) += avdevice
  FFLIBS-$(CONFIG_AVFILTER) += avfilter
  FFLIBS-$(CONFIG_AVFORMAT) += avformat
+ FFLIBS-$(CONFIG_AVRESAMPLE) += avresample
  FFLIBS-$(CONFIG_AVCODEC)  += avcodec
 +FFLIBS-$(CONFIG_POSTPROC) += postproc
 +FFLIBS-$(CONFIG_SWRESAMPLE)+= swresample
  FFLIBS-$(CONFIG_SWSCALE)  += swscale
  
  FFLIBS := avutil
diff --cc cmdutils.c
  #include "libavformat/avformat.h"
  #include "libavfilter/avfilter.h"
  #include "libavdevice/avdevice.h"
+ #include "libavresample/avresample.h"
  #include "libswscale/swscale.h"
 +#include "libswresample/swresample.h"
 +#if CONFIG_POSTPROC
 +#include "libpostproc/postprocess.h"
 +#endif
  #include "libavutil/avstring.h"
  #include "libavutil/mathematics.h"
  #include "libavutil/parseutils.h"
@@@ -633,7 -461,8 +634,8 @@@ static int warned_cfg = 0
          const char *indent = flags & INDENT? "  " : "";                 \
          if (flags & SHOW_VERSION) {                                     \
              unsigned int version = libname##_version();                 \
-             av_log(NULL, level, "%slib%-11s %2d.%3d.%3d / %2d.%3d.%3d\n",\
+             av_log(NULL, level,                                         \
 -                   "%slib%-10s %2d.%3d.%2d / %2d.%3d.%2d\n",            \
++                   "%slib%-11s %2d.%3d.%3d / %2d.%3d.%3d\n",            \
                     indent, #libname,                                    \
                     LIB##LIBNAME##_VERSION_MAJOR,                        \
                     LIB##LIBNAME##_VERSION_MINOR,                        \
@@@ -662,46 -491,29 +664,47 @@@ static void print_all_libs_info(int fla
      PRINT_LIB_INFO(avformat, AVFORMAT, flags, level);
      PRINT_LIB_INFO(avdevice, AVDEVICE, flags, level);
      PRINT_LIB_INFO(avfilter, AVFILTER, flags, level);
 -    PRINT_LIB_INFO(avresample, AVRESAMPLE, flags, level);
++//    PRINT_LIB_INFO(avresample, AVRESAMPLE, flags, level);
      PRINT_LIB_INFO(swscale,  SWSCALE,  flags, level);
 +    PRINT_LIB_INFO(swresample,SWRESAMPLE,  flags, level);
 +#if CONFIG_POSTPROC
 +    PRINT_LIB_INFO(postproc, POSTPROC, flags, level);
 +#endif
  }
  
 -void show_banner(void)
 +static void print_program_info(int flags, int level)
  {
 -    av_log(NULL, AV_LOG_INFO,
 -           "%s version " LIBAV_VERSION ", Copyright (c) %d-%d the Libav developers\n",
 -           program_name, program_birth_year, this_year);
 -    av_log(NULL, AV_LOG_INFO, "  built on %s %s with %s %s\n",
 -           __DATE__, __TIME__, CC_TYPE, CC_VERSION);
 -    av_log(NULL, AV_LOG_VERBOSE, "  configuration: " LIBAV_CONFIGURATION "\n");
 -    print_all_libs_info(INDENT|SHOW_CONFIG,  AV_LOG_VERBOSE);
 -    print_all_libs_info(INDENT|SHOW_VERSION, AV_LOG_VERBOSE);
 +    const char *indent = flags & INDENT? "  " : "";
 +
 +    av_log(NULL, level, "%s version " FFMPEG_VERSION, program_name);
 +    if (flags & SHOW_COPYRIGHT)
 +        av_log(NULL, level, " Copyright (c) %d-%d the FFmpeg developers",
 +               program_birth_year, this_year);
 +    av_log(NULL, level, "\n");
 +    av_log(NULL, level, "%sbuilt on %s %s with %s %s\n",
 +           indent, __DATE__, __TIME__, CC_TYPE, CC_VERSION);
 +    av_log(NULL, level, "%sconfiguration: " FFMPEG_CONFIGURATION "\n", indent);
  }
  
 -void show_version(void) {
 +void show_banner(int argc, char **argv, const OptionDef *options)
 +{
 +    int idx = locate_option(argc, argv, options, "version");
 +    if (idx)
 +        return;
 +
 +    print_program_info (INDENT|SHOW_COPYRIGHT, AV_LOG_INFO);
 +    print_all_libs_info(INDENT|SHOW_CONFIG,  AV_LOG_INFO);
 +    print_all_libs_info(INDENT|SHOW_VERSION, AV_LOG_INFO);
 +}
 +
 +int opt_version(const char *opt, const char *arg) {
      av_log_set_callback(log_callback_help);
 -    printf("%s " LIBAV_VERSION "\n", program_name);
 +    print_program_info (0           , AV_LOG_INFO);
      print_all_libs_info(SHOW_VERSION, AV_LOG_INFO);
 +    return 0;
  }
  
 -void show_license(void)
 +int opt_license(const char *opt, const char *arg)
  {
      printf(
  #if CONFIG_NONFREE
diff --cc common.mak
@@@ -5,74 -5,6 +5,74 @@@
  # first so "all" becomes default target
  all: all-yes
  
- ALLFFLIBS = avcodec avdevice avfilter avformat avutil postproc swscale swresample
 +ifndef SUBDIR
 +
 +ifndef V
 +Q      = @
 +ECHO   = printf "$(1)\t%s\n" $(2)
 +BRIEF  = CC CXX AS YASM AR LD HOSTCC STRIP CP
 +SILENT = DEPCC YASMDEP RM RANLIB
 +MSG    = $@
 +M      = @$(call ECHO,$(TAG),$@);
 +$(foreach VAR,$(BRIEF), \
 +    $(eval override $(VAR) = @$$(call ECHO,$(VAR),$$(MSG)); $($(VAR))))
 +$(foreach VAR,$(SILENT),$(eval override $(VAR) = @$($(VAR))))
 +$(eval INSTALL = @$(call ECHO,INSTALL,$$(^:$(SRC_DIR)/%=%)); $(INSTALL))
 +endif
 +
++ALLFFLIBS = avcodec avdevice avfilter avformat avresample avutil postproc swscale swresample
 +
 +# NASM requires -I path terminated with /
 +IFLAGS     := -I. -I$(SRC_PATH)/
 +CPPFLAGS   := $(IFLAGS) $(CPPFLAGS)
 +CFLAGS     += $(ECFLAGS)
 +CCFLAGS     = $(CFLAGS)
 +CXXFLAGS   := $(CFLAGS) $(CXXFLAGS)
 +YASMFLAGS  += $(IFLAGS) -I$(SRC_PATH)/libavutil/x86/ -Pconfig.asm
 +HOSTCFLAGS += $(IFLAGS)
 +LDFLAGS    := $(ALLFFLIBS:%=-Llib%) $(LDFLAGS)
 +
 +define COMPILE
 +       $($(1)DEP)
 +       $($(1)) $(CPPFLAGS) $($(1)FLAGS) $($(1)_DEPFLAGS) -c $($(1)_O) $<
 +endef
 +
 +COMPILE_C = $(call COMPILE,CC)
 +COMPILE_CXX = $(call COMPILE,CXX)
 +COMPILE_S = $(call COMPILE,AS)
 +
 +%.o: %.c
 +      $(COMPILE_C)
 +
 +%.o: %.cpp
 +      $(COMPILE_CXX)
 +
 +%.s: %.c
 +      $(CC) $(CPPFLAGS) $(CFLAGS) -S -o $@ $<
 +
 +%.o: %.S
 +      $(COMPILE_S)
 +
 +%.ho: %.h
 +      $(CC) $(CPPFLAGS) $(CFLAGS) -Wno-unused -c -o $@ -x c $<
 +
 +%.ver: %.v
 +      $(Q)sed 's/$$MAJOR/$($(basename $(@F))_VERSION_MAJOR)/' $^ > $@
 +
 +%.c %.h: TAG = GEN
 +
 +# Dummy rule to stop make trying to rebuild removed or renamed headers
 +%.h:
 +      @:
 +
 +# Disable suffix rules.  Most of the builtin rules are suffix rules,
 +# so this saves some time on slow systems.
 +.SUFFIXES:
 +
 +# Do not delete intermediate files from chains of implicit rules
 +$(OBJS):
 +endif
 +
  include $(SRC_PATH)/arch.mak
  
  OBJS      += $(OBJS-yes)
diff --cc configure
+++ b/configure
@@@ -108,13 -108,11 +108,14 @@@ Component options
    --disable-avdevice       disable libavdevice build
    --disable-avcodec        disable libavcodec build
    --disable-avformat       disable libavformat build
 +  --disable-swresample     disable libswresample build
    --disable-swscale        disable libswscale build
 +  --disable-postproc       disable libpostproc build
    --disable-avfilter       disable video filter support [no]
+   --disable-avresample     disable libavresample build [no]
    --disable-pthreads       disable pthreads [auto]
    --disable-w32threads     disable Win32 threads [auto]
 +  --disable-os2threads     disable OS/2 threads [auto]
    --enable-x11grab         enable X11 grabbing [no]
    --disable-network        disable network support [no]
    --disable-dct            disable DCT code
@@@ -1013,9 -928,9 +1014,10 @@@ CONFIG_LIST=
      avdevice
      avfilter
      avformat
+     avresample
      avisynth
      bzlib
 +    crystalhd
      dct
      doc
      dwt
@@@ -1870,10 -1686,8 +1872,11 @@@ enable avcode
  enable avdevice
  enable avfilter
  enable avformat
+ enable avresample
  enable avutil
 +enable postproc
 +enable stripping
 +enable swresample
  enable swscale
  
  enable asm
@@@ -3724,9 -3388,8 +3727,10 @@@ get_version LIBAVCODEC  libavcodec/vers
  get_version LIBAVDEVICE libavdevice/avdevice.h
  get_version LIBAVFILTER libavfilter/version.h
  get_version LIBAVFORMAT libavformat/version.h
+ get_version LIBAVRESAMPLE libavresample/version.h
  get_version LIBAVUTIL   libavutil/avutil.h
 +get_version LIBPOSTPROC libpostproc/postprocess.h
 +get_version LIBSWRESAMPLE libswresample/swresample.h
  get_version LIBSWSCALE  libswscale/swscale.h
  
  cat > $TMPH <<EOF
@@@ -3852,22 -3503,10 +3856,23 @@@ Cflags: -I\${includedir
  EOF
  }
  
 -pkgconfig_generate libavutil "Libav utility library" "$LIBAVUTIL_VERSION" "$LIBM"
 -pkgconfig_generate libavcodec "Libav codec library" "$LIBAVCODEC_VERSION" "$extralibs" "libavutil = $LIBAVUTIL_VERSION"
 -pkgconfig_generate libavformat "Libav container format library" "$LIBAVFORMAT_VERSION" "$extralibs" "libavcodec = $LIBAVCODEC_VERSION"
 -pkgconfig_generate libavdevice "Libav device handling library" "$LIBAVDEVICE_VERSION" "$extralibs" "libavformat = $LIBAVFORMAT_VERSION"
 -pkgconfig_generate libavfilter "Libav video filtering library" "$LIBAVFILTER_VERSION" "$extralibs"
 +libavfilter_pc_deps=""
 +enabled libavfilter_deps_avcodec    && prepend libavfilter_pc_deps "libavcodec = $LIBAVCODEC_VERSION,"
 +enabled libavfilter_deps_avformat   && prepend libavfilter_pc_deps "libavformat = $LIBAVFORMAT_VERSION,"
 +enabled libavfilter_deps_swscale    && prepend libavfilter_pc_deps "libswscale = $LIBSWSCALE_VERSION,"
 +enabled libavfilter_deps_swresample && prepend libavfilter_pc_deps "libswresample = $LIBSWRESAMPLE_VERSION,"
 +enabled libavfilter_deps_postproc   && prepend libavfilter_pc_deps "libpostproc = $LIBPOSTPROC_VERSION,"
 +libavfilter_pc_deps=${libavfilter_pc_deps%, }
 +
 +libavdevice_pc_deps="libavformat = $LIBAVFORMAT_VERSION"
 +enabled lavfi_indev && prepend libavdevice_pc_deps "libavfilter = $LIBAVFILTER_VERSION,"
 +
 +pkgconfig_generate libavutil "FFmpeg utility library" "$LIBAVUTIL_VERSION" "$LIBM"
 +pkgconfig_generate libavcodec "FFmpeg codec library" "$LIBAVCODEC_VERSION" "$extralibs" "libavutil = $LIBAVUTIL_VERSION"
 +pkgconfig_generate libavformat "FFmpeg container format library" "$LIBAVFORMAT_VERSION" "$extralibs" "libavcodec = $LIBAVCODEC_VERSION"
 +pkgconfig_generate libavdevice "FFmpeg device handling library" "$LIBAVDEVICE_VERSION" "$extralibs" "$libavdevice_pc_deps"
 +pkgconfig_generate libavfilter "FFmpeg video filtering library" "$LIBAVFILTER_VERSION" "$extralibs" "$libavfilter_pc_deps"
 +pkgconfig_generate libpostproc "FFmpeg postprocessing library" "$LIBPOSTPROC_VERSION" "" "libavutil = $LIBAVUTIL_VERSION"
+ pkgconfig_generate libavresample "Libav audio resampling library" "$LIBAVRESAMPLE_VERSION" "$extralibs"
 -pkgconfig_generate libswscale "Libav image rescaling library" "$LIBSWSCALE_VERSION" "$LIBM" "libavutil = $LIBAVUTIL_VERSION"
 +pkgconfig_generate libswscale "FFmpeg image rescaling library" "$LIBSWSCALE_VERSION" "$LIBM" "libavutil = $LIBAVUTIL_VERSION"
 +pkgconfig_generate libswresample "FFmpeg audio rescaling library" "$LIBSWRESAMPLE_VERSION" "$LIBM" "libavutil = $LIBAVUTIL_VERSION"
diff --cc doc/APIchanges
@@@ -2,26 -2,20 +2,30 @@@ Never assume the API of libav* to be st
  since the last major version increase.
  
  The last version increases were:
 -libavcodec:    2012-01-27
 -libavdevice:   2011-04-18
 -libavfilter:   2011-04-18
 -libavformat:   2012-01-27
 +libavcodec:  2012-01-27
 +libavdevice: 2011-04-18
 +libavfilter: 2011-04-18
 +libavformat: 2012-01-27
+ libavresample: 2012-xx-xx
 -libswscale:    2011-06-20
 -libavutil:     2011-04-18
 +libpostproc: 2011-04-18
 +libswscale:  2011-06-20
 +libavutil:   2011-04-18
  
  
  API changes, most recent first:
  
 +2012-04-20 - xxxxxxx - lavfi 2.70.100
 +  Add avfilter_unref_bufferp() to avfilter.h.
 +
 +2012-04-12 - xxxxxxx - lavfi 2.68.100
 +  Install libavfilter/asrc_abuffer.h public header.
 +
 +2012-03-26 - a67d9cf - lavfi 2.66.100
 +  Add avfilter_fill_frame_from_{audio_,}buffer_ref() functions.
 +
+ 2012-xx-xx - xxxxxxx - lavr 0.0.0
+   Add libavresample audio conversion library
  2012-xx-xx - xxxxxxx - lavu 51.28.0 - audio_fifo.h
    Add audio FIFO functions:
      av_audio_fifo_free()
diff --cc ffmpeg.c
+++ b/ffmpeg.c
@@@ -35,8 -31,8 +35,7 @@@
  #include "libavformat/avformat.h"
  #include "libavdevice/avdevice.h"
  #include "libswscale/swscale.h"
 -#include "libavresample/avresample.h"
  #include "libavutil/opt.h"
- #include "libavcodec/audioconvert.h"
  #include "libavutil/audioconvert.h"
  #include "libavutil/parseutils.h"
  #include "libavutil/samplefmt.h"
@@@ -296,12 -266,11 +295,13 @@@ typedef struct OutputStream 
  
      /* audio only */
      int audio_resample;
 -    AVAudioResampleContext *avr;
 +    int audio_channels_map[SWR_CH_MAX];  ///< list of the channels id to pick from the source stream
 +    int audio_channels_mapped;           ///< number of channels in audio_channels_map
      int resample_sample_fmt;
      int resample_channels;
+     uint64_t resample_channel_layout;
      int resample_sample_rate;
 +    float rematrix_volume;
      AVFifoBuffer *fifo;     /* for compression: one audio fifo per codec */
      FILE *logfile;
  
@@@ -1555,26 -1343,20 +1555,29 @@@ static void do_audio_out(AVFormatContex
                           InputStream *ist, AVFrame *decoded_frame)
  {
      uint8_t *buftmp;
 +    int64_t size_out;
  
-     int frame_bytes, resample_changed;
 -    int size_out, frame_bytes, resample_changed, ret;
++    int frame_bytes, resample_changed, ret;
      AVCodecContext *enc = ost->st->codec;
      AVCodecContext *dec = ist->st->codec;
      int osize = av_get_bytes_per_sample(enc->sample_fmt);
      int isize = av_get_bytes_per_sample(dec->sample_fmt);
 -    uint8_t *buf = decoded_frame->data[0];
 +    uint8_t *buf[AV_NUM_DATA_POINTERS];
      int size     = decoded_frame->nb_samples * dec->channels * isize;
 +    int planes   = av_sample_fmt_is_planar(dec->sample_fmt) ? dec->channels : 1;
 +    int i;
+     int out_linesize = 0;
+     int buf_linesize = decoded_frame->linesize[0];
  
 +    av_assert0(planes <= AV_NUM_DATA_POINTERS);
 +
 +    for(i=0; i<planes; i++)
 +        buf[i]= decoded_frame->data[i];
 +
++
      get_default_channel_layouts(ost, ist);
  
-     if (alloc_audio_output_buf(dec, enc, decoded_frame->nb_samples) < 0) {
+     if (alloc_audio_output_buf(dec, enc, decoded_frame->nb_samples, &out_linesize) < 0) {
          av_log(NULL, AV_LOG_FATAL, "Error allocating audio buffer\n");
          exit_program(1);
      }
  
      resample_changed = ost->resample_sample_fmt  != dec->sample_fmt ||
                         ost->resample_channels    != dec->channels   ||
+                        ost->resample_channel_layout != dec->channel_layout ||
                         ost->resample_sample_rate != dec->sample_rate;
  
 -    if ((ost->audio_resample && !ost->avr) || resample_changed) {
 +    if ((ost->audio_resample && !ost->swr) || resample_changed || ost->audio_channels_mapped) {
++
          if (resample_changed) {
-             av_log(NULL, AV_LOG_INFO, "Input stream #%d:%d frame changed from rate:%d fmt:%s ch:%d to rate:%d fmt:%s ch:%d\n",
+             av_log(NULL, AV_LOG_INFO, "Input stream #%d:%d frame changed from rate:%d fmt:%s ch:%d chl:0x%"PRIx64" to rate:%d fmt:%s ch:%d chl:0x%"PRIx64"\n",
                     ist->file_index, ist->st->index,
-                    ost->resample_sample_rate, av_get_sample_fmt_name(ost->resample_sample_fmt), ost->resample_channels,
-                    dec->sample_rate, av_get_sample_fmt_name(dec->sample_fmt), dec->channels);
+                    ost->resample_sample_rate, av_get_sample_fmt_name(ost->resample_sample_fmt),
+                    ost->resample_channels, ost->resample_channel_layout,
+                    dec->sample_rate, av_get_sample_fmt_name(dec->sample_fmt),
+                    dec->channels, dec->channel_layout);
              ost->resample_sample_fmt  = dec->sample_fmt;
              ost->resample_channels    = dec->channels;
+             ost->resample_channel_layout = dec->channel_layout;
              ost->resample_sample_rate = dec->sample_rate;
 -            if (ost->avr)
 -                avresample_close(ost->avr);
 +            swr_free(&ost->swr);
          }
          /* if audio_sync_method is >1 the resampler is needed for audio drift compensation */
 -        if (audio_sync_method <= 1 &&
 +        if (audio_sync_method <= 1 && !ost->audio_channels_mapped &&
              ost->resample_sample_fmt  == enc->sample_fmt &&
              ost->resample_channels    == enc->channels   &&
+             ost->resample_channel_layout == enc->channel_layout &&
              ost->resample_sample_rate == enc->sample_rate) {
 +            //ost->swr = NULL;
              ost->audio_resample = 0;
 -        } else if (ost->audio_resample) {
 -            if (!ost->avr) {
 -                ost->avr = avresample_alloc_context();
 -                if (!ost->avr) {
 -                    av_log(NULL, AV_LOG_FATAL, "Error allocating context for libavresample\n");
 -                    exit_program(1);
 -                }
 +        } else {
 +            ost->swr = swr_alloc_set_opts(ost->swr,
 +                                          enc->channel_layout, enc->sample_fmt, enc->sample_rate,
 +                                          dec->channel_layout, dec->sample_fmt, dec->sample_rate,
 +                                          0, NULL);
 +            av_opt_set_int(ost->swr, "dither_method", ost->swr_dither_method,0);
 +            av_opt_set_int(ost->swr, "dither_scale", ost->swr_dither_scale,0);
 +            if (ost->audio_channels_mapped)
 +                swr_set_channel_mapping(ost->swr, ost->audio_channels_map);
 +            av_opt_set_double(ost->swr, "rmvol", ost->rematrix_volume, 0);
 +            if (ost->audio_channels_mapped) {
 +                av_opt_set_int(ost->swr, "icl", av_get_default_channel_layout(ost->audio_channels_mapped), 0);
 +                av_opt_set_int(ost->swr, "uch", ost->audio_channels_mapped, 0);
              }
 -
 -            av_opt_set_int(ost->avr, "in_channel_layout",  dec->channel_layout, 0);
 -            av_opt_set_int(ost->avr, "in_sample_fmt",      dec->sample_fmt,     0);
 -            av_opt_set_int(ost->avr, "in_sample_rate",     dec->sample_rate,    0);
 -            av_opt_set_int(ost->avr, "out_channel_layout", enc->channel_layout, 0);
 -            av_opt_set_int(ost->avr, "out_sample_fmt",     enc->sample_fmt,     0);
 -            av_opt_set_int(ost->avr, "out_sample_rate",    enc->sample_rate,    0);
 -            if (audio_sync_method > 1)
 -                av_opt_set_int(ost->avr, "force_resampling", 1, 0);
 -
 -            /* if both the input and output formats are s16 or u8, use s16 as
 -               the internal sample format */
 -            if (av_get_bytes_per_sample(dec->sample_fmt) <= 2 &&
 -                av_get_bytes_per_sample(enc->sample_fmt) <= 2) {
 -                av_opt_set_int(ost->avr, "internal_sample_fmt", AV_SAMPLE_FMT_S16P, 0);
 +            if (av_opt_set_int(ost->swr, "ich", dec->channels, 0) < 0) {
 +                av_log(NULL, AV_LOG_FATAL, "Unsupported number of input channels\n");
 +                exit_program(1);
 +            }
 +            if (av_opt_set_int(ost->swr, "och", enc->channels, 0) < 0) {
 +                av_log(NULL, AV_LOG_FATAL, "Unsupported number of output channels\n");
 +                exit_program(1);
 +            }
 +            if(audio_sync_method>1) av_opt_set_int(ost->swr, "flags", SWR_FLAG_RESAMPLE, 0);
 +            if(ost->swr && swr_init(ost->swr) < 0){
 +                av_log(NULL, AV_LOG_FATAL, "swr_init() failed\n");
 +                swr_free(&ost->swr);
              }
  
 -            ret = avresample_open(ost->avr);
 -            if (ret < 0) {
 -                av_log(NULL, AV_LOG_FATAL, "Error opening libavresample\n");
 +            if (!ost->swr) {
 +                av_log(NULL, AV_LOG_FATAL, "Can not resample %d channels @ %d Hz to %d channels @ %d Hz\n",
 +                        dec->channels, dec->sample_rate,
 +                        enc->channels, enc->sample_rate);
                  exit_program(1);
              }
          }
                      }
                      ist->is_start = 0;
  
 -                    generate_silence(async_buf, dec->sample_fmt, byte_delta);
 -                    memcpy(async_buf + byte_delta, buf, size);
 -                    buf = async_buf;
 +                    for (i=0; i<planes; i++) {
 +                        uint8_t *t = async_buf + i*((byte_delta + size)/planes);
 +                        generate_silence(t, dec->sample_fmt, byte_delta/planes);
 +                        memcpy(t + byte_delta/planes, buf[i], size/planes);
 +                        buf[i] = t;
 +                    }
                      size += byte_delta;
+                     buf_linesize = allocated_async_buf_size;
                      av_log(NULL, AV_LOG_VERBOSE, "adding %d audio samples of silence\n", idelta);
                  }
              } else if (audio_sync_method > 1) {
              }
          }
      } else if (audio_sync_method == 0)
 -        ost->sync_opts = lrintf(get_sync_ipts(ost, ist->last_dts) * enc->sample_rate) -
 +        ost->sync_opts = lrintf(get_sync_ipts(ost, ist->pts) * enc->sample_rate) -
                                  av_fifo_size(ost->fifo) / (enc->channels * osize); // FIXME wrong
  
 -    if (ost->audio_resample) {
 +    if (ost->audio_resample || ost->audio_channels_mapped) {
          buftmp = audio_buf;
-         size_out = swr_convert(ost->swr, (      uint8_t*[]){buftmp}, allocated_audio_buf_size / (enc->channels * osize),
-                                          buf, size / (dec->channels * isize));
 -        size_out = avresample_convert(ost->avr, (void **)&buftmp,
 -                                      allocated_audio_buf_size, out_linesize,
 -                                      (void **)&buf, buf_linesize,
++        size_out = swr_convert(ost->swr, (      uint8_t*[]){buftmp},
++                                      allocated_audio_buf_size / (enc->channels * osize),
++                                      buf,
+                                       size / (dec->channels * isize));
 +        if (size_out < 0) {
 +            av_log(NULL, AV_LOG_FATAL, "swr_convert failed\n");
 +            exit_program(1);
 +        }
          size_out = size_out * enc->channels * osize;
      } else {
 -        buftmp = buf;
 +        buftmp = buf[0];
          size_out = size;
      }
  
@@@ -3110,10 -2721,7 +3123,11 @@@ static int transcode_init(void
                  if (av_get_channel_layout_nb_channels(codec->channel_layout) != codec->channels)
                      codec->channel_layout = 0;
  
-                 ost->audio_resample       = codec->sample_rate != icodec->sample_rate || audio_sync_method > 1;
-                 ost->audio_resample      |=    codec->sample_fmt     != icodec->sample_fmt
-                                             || codec->channel_layout != icodec->channel_layout;
-                 icodec->request_channels  = codec->channels;
++
++//                 ost->audio_resample       = codec->sample_rate != icodec->sample_rate || audio_sync_method > 1;
++//                 ost->audio_resample      |=    codec->sample_fmt     != icodec->sample_fmt
++//                                             || codec->channel_layout != icodec->channel_layout;
+                 icodec->request_channels  = codec-> channels;
                  ost->resample_sample_fmt  = icodec->sample_fmt;
                  ost->resample_sample_rate = icodec->sample_rate;
                  ost->resample_channels    = icodec->channels;
index 0000000,f54dcc6..78ef153
mode 000000,100644..100644
--- /dev/null
@@@ -1,0 -1,405 +1,405 @@@
 -#include "libavutil/error.h"
+ /*
+  * Copyright (c) 2012 Justin Ruggles <justin.ruggles@gmail.com>
+  *
+  * This file is part of Libav.
+  *
+  * Libav 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.
+  *
+  * Libav 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 Libav; if not, write to the Free Software
+  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+  */
+ #include "libavutil/dict.h"
 -    return LICENSE_PREFIX LIBAV_LICENSE + sizeof(LICENSE_PREFIX) - 1;
++// #include "libavutil/error.h"
+ #include "libavutil/log.h"
+ #include "libavutil/mem.h"
+ #include "libavutil/opt.h"
+ #include "avresample.h"
+ #include "audio_data.h"
+ #include "internal.h"
+ int avresample_open(AVAudioResampleContext *avr)
+ {
+     int ret;
+     /* set channel mixing parameters */
+     avr->in_channels = av_get_channel_layout_nb_channels(avr->in_channel_layout);
+     if (avr->in_channels <= 0 || avr->in_channels > AVRESAMPLE_MAX_CHANNELS) {
+         av_log(avr, AV_LOG_ERROR, "Invalid input channel layout: %"PRIu64"\n",
+                avr->in_channel_layout);
+         return AVERROR(EINVAL);
+     }
+     avr->out_channels = av_get_channel_layout_nb_channels(avr->out_channel_layout);
+     if (avr->out_channels <= 0 || avr->out_channels > AVRESAMPLE_MAX_CHANNELS) {
+         av_log(avr, AV_LOG_ERROR, "Invalid output channel layout: %"PRIu64"\n",
+                avr->out_channel_layout);
+         return AVERROR(EINVAL);
+     }
+     avr->resample_channels = FFMIN(avr->in_channels, avr->out_channels);
+     avr->downmix_needed    = avr->in_channels  > avr->out_channels;
+     avr->upmix_needed      = avr->out_channels > avr->in_channels ||
+                              avr->am->matrix                      ||
+                              (avr->out_channels == avr->in_channels &&
+                               avr->in_channel_layout != avr->out_channel_layout);
+     avr->mixing_needed     = avr->downmix_needed || avr->upmix_needed;
+     /* set resampling parameters */
+     avr->resample_needed   = avr->in_sample_rate != avr->out_sample_rate ||
+                              avr->force_resampling;
+     /* set sample format conversion parameters */
+     /* override user-requested internal format to avoid unexpected failures
+        TODO: support more internal formats */
+     if (avr->resample_needed && avr->internal_sample_fmt != AV_SAMPLE_FMT_S16P) {
+         av_log(avr, AV_LOG_WARNING, "Using s16p as internal sample format\n");
+         avr->internal_sample_fmt = AV_SAMPLE_FMT_S16P;
+     } else if (avr->mixing_needed &&
+                avr->internal_sample_fmt != AV_SAMPLE_FMT_S16P &&
+                avr->internal_sample_fmt != AV_SAMPLE_FMT_FLTP) {
+         av_log(avr, AV_LOG_WARNING, "Using fltp as internal sample format\n");
+         avr->internal_sample_fmt = AV_SAMPLE_FMT_FLTP;
+     }
+     if (avr->in_channels == 1)
+         avr->in_sample_fmt = av_get_planar_sample_fmt(avr->in_sample_fmt);
+     if (avr->out_channels == 1)
+         avr->out_sample_fmt = av_get_planar_sample_fmt(avr->out_sample_fmt);
+     avr->in_convert_needed = (avr->resample_needed || avr->mixing_needed) &&
+                               avr->in_sample_fmt != avr->internal_sample_fmt;
+     if (avr->resample_needed || avr->mixing_needed)
+         avr->out_convert_needed = avr->internal_sample_fmt != avr->out_sample_fmt;
+     else
+         avr->out_convert_needed = avr->in_sample_fmt != avr->out_sample_fmt;
+     /* allocate buffers */
+     if (avr->mixing_needed || avr->in_convert_needed) {
+         avr->in_buffer = ff_audio_data_alloc(FFMAX(avr->in_channels, avr->out_channels),
+                                              0, avr->internal_sample_fmt,
+                                              "in_buffer");
+         if (!avr->in_buffer) {
+             ret = AVERROR(EINVAL);
+             goto error;
+         }
+     }
+     if (avr->resample_needed) {
+         avr->resample_out_buffer = ff_audio_data_alloc(avr->out_channels,
+                                                        0, avr->internal_sample_fmt,
+                                                        "resample_out_buffer");
+         if (!avr->resample_out_buffer) {
+             ret = AVERROR(EINVAL);
+             goto error;
+         }
+     }
+     if (avr->out_convert_needed) {
+         avr->out_buffer = ff_audio_data_alloc(avr->out_channels, 0,
+                                               avr->out_sample_fmt, "out_buffer");
+         if (!avr->out_buffer) {
+             ret = AVERROR(EINVAL);
+             goto error;
+         }
+     }
+     avr->out_fifo = av_audio_fifo_alloc(avr->out_sample_fmt, avr->out_channels,
+                                         1024);
+     if (!avr->out_fifo) {
+         ret = AVERROR(ENOMEM);
+         goto error;
+     }
+     /* setup contexts */
+     if (avr->in_convert_needed) {
+         avr->ac_in = ff_audio_convert_alloc(avr, avr->internal_sample_fmt,
+                                             avr->in_sample_fmt, avr->in_channels);
+         if (!avr->ac_in) {
+             ret = AVERROR(ENOMEM);
+             goto error;
+         }
+     }
+     if (avr->out_convert_needed) {
+         enum AVSampleFormat src_fmt;
+         if (avr->in_convert_needed)
+             src_fmt = avr->internal_sample_fmt;
+         else
+             src_fmt = avr->in_sample_fmt;
+         avr->ac_out = ff_audio_convert_alloc(avr, avr->out_sample_fmt, src_fmt,
+                                              avr->out_channels);
+         if (!avr->ac_out) {
+             ret = AVERROR(ENOMEM);
+             goto error;
+         }
+     }
+     if (avr->resample_needed) {
+         avr->resample = ff_audio_resample_init(avr);
+         if (!avr->resample) {
+             ret = AVERROR(ENOMEM);
+             goto error;
+         }
+     }
+     if (avr->mixing_needed) {
+         ret = ff_audio_mix_init(avr);
+         if (ret < 0)
+             goto error;
+     }
+     return 0;
+ error:
+     avresample_close(avr);
+     return ret;
+ }
+ void avresample_close(AVAudioResampleContext *avr)
+ {
+     ff_audio_data_free(&avr->in_buffer);
+     ff_audio_data_free(&avr->resample_out_buffer);
+     ff_audio_data_free(&avr->out_buffer);
+     av_audio_fifo_free(avr->out_fifo);
+     avr->out_fifo = NULL;
+     av_freep(&avr->ac_in);
+     av_freep(&avr->ac_out);
+     ff_audio_resample_free(&avr->resample);
+     ff_audio_mix_close(avr->am);
+     return;
+ }
+ void avresample_free(AVAudioResampleContext **avr)
+ {
+     if (!*avr)
+         return;
+     avresample_close(*avr);
+     av_freep(&(*avr)->am);
+     av_opt_free(*avr);
+     av_freep(avr);
+ }
+ static int handle_buffered_output(AVAudioResampleContext *avr,
+                                   AudioData *output, AudioData *converted)
+ {
+     int ret;
+     if (!output || av_audio_fifo_size(avr->out_fifo) > 0 ||
+         (converted && output->allocated_samples < converted->nb_samples)) {
+         if (converted) {
+             /* if there are any samples in the output FIFO or if the
+                user-supplied output buffer is not large enough for all samples,
+                we add to the output FIFO */
+             av_dlog(avr, "[FIFO] add %s to out_fifo\n", converted->name);
+             ret = ff_audio_data_add_to_fifo(avr->out_fifo, converted, 0,
+                                             converted->nb_samples);
+             if (ret < 0)
+                 return ret;
+         }
+         /* if the user specified an output buffer, read samples from the output
+            FIFO to the user output */
+         if (output && output->allocated_samples > 0) {
+             av_dlog(avr, "[FIFO] read from out_fifo to output\n");
+             av_dlog(avr, "[end conversion]\n");
+             return ff_audio_data_read_from_fifo(avr->out_fifo, output,
+                                                 output->allocated_samples);
+         }
+     } else if (converted) {
+         /* copy directly to output if it is large enough or there is not any
+            data in the output FIFO */
+         av_dlog(avr, "[copy] %s to output\n", converted->name);
+         output->nb_samples = 0;
+         ret = ff_audio_data_copy(output, converted);
+         if (ret < 0)
+             return ret;
+         av_dlog(avr, "[end conversion]\n");
+         return output->nb_samples;
+     }
+     av_dlog(avr, "[end conversion]\n");
+     return 0;
+ }
+ int avresample_convert(AVAudioResampleContext *avr, void **output,
+                        int out_plane_size, int out_samples, void **input,
+                        int in_plane_size, int in_samples)
+ {
+     AudioData input_buffer;
+     AudioData output_buffer;
+     AudioData *current_buffer;
+     int ret;
+     /* reset internal buffers */
+     if (avr->in_buffer) {
+         avr->in_buffer->nb_samples = 0;
+         ff_audio_data_set_channels(avr->in_buffer,
+                                    avr->in_buffer->allocated_channels);
+     }
+     if (avr->resample_out_buffer) {
+         avr->resample_out_buffer->nb_samples = 0;
+         ff_audio_data_set_channels(avr->resample_out_buffer,
+                                    avr->resample_out_buffer->allocated_channels);
+     }
+     if (avr->out_buffer) {
+         avr->out_buffer->nb_samples = 0;
+         ff_audio_data_set_channels(avr->out_buffer,
+                                    avr->out_buffer->allocated_channels);
+     }
+     av_dlog(avr, "[start conversion]\n");
+     /* initialize output_buffer with output data */
+     if (output) {
+         ret = ff_audio_data_init(&output_buffer, output, out_plane_size,
+                                  avr->out_channels, out_samples,
+                                  avr->out_sample_fmt, 0, "output");
+         if (ret < 0)
+             return ret;
+         output_buffer.nb_samples = 0;
+     }
+     if (input) {
+         /* initialize input_buffer with input data */
+         ret = ff_audio_data_init(&input_buffer, input, in_plane_size,
+                                  avr->in_channels, in_samples,
+                                  avr->in_sample_fmt, 1, "input");
+         if (ret < 0)
+             return ret;
+         current_buffer = &input_buffer;
+         if (avr->upmix_needed && !avr->in_convert_needed && !avr->resample_needed &&
+             !avr->out_convert_needed && output && out_samples >= in_samples) {
+             /* in some rare cases we can copy input to output and upmix
+                directly in the output buffer */
+             av_dlog(avr, "[copy] %s to output\n", current_buffer->name);
+             ret = ff_audio_data_copy(&output_buffer, current_buffer);
+             if (ret < 0)
+                 return ret;
+             current_buffer = &output_buffer;
+         } else if (avr->mixing_needed || avr->in_convert_needed) {
+             /* if needed, copy or convert input to in_buffer, and downmix if
+                applicable */
+             if (avr->in_convert_needed) {
+                 ret = ff_audio_data_realloc(avr->in_buffer,
+                                             current_buffer->nb_samples);
+                 if (ret < 0)
+                     return ret;
+                 av_dlog(avr, "[convert] %s to in_buffer\n", current_buffer->name);
+                 ret = ff_audio_convert(avr->ac_in, avr->in_buffer, current_buffer,
+                                        current_buffer->nb_samples);
+                 if (ret < 0)
+                     return ret;
+             } else {
+                 av_dlog(avr, "[copy] %s to in_buffer\n", current_buffer->name);
+                 ret = ff_audio_data_copy(avr->in_buffer, current_buffer);
+                 if (ret < 0)
+                     return ret;
+             }
+             ff_audio_data_set_channels(avr->in_buffer, avr->in_channels);
+             if (avr->downmix_needed) {
+                 av_dlog(avr, "[downmix] in_buffer\n");
+                 ret = ff_audio_mix(avr->am, avr->in_buffer);
+                 if (ret < 0)
+                     return ret;
+             }
+             current_buffer = avr->in_buffer;
+         }
+     } else {
+         /* flush resampling buffer and/or output FIFO if input is NULL */
+         if (!avr->resample_needed)
+             return handle_buffered_output(avr, output ? &output_buffer : NULL,
+                                           NULL);
+         current_buffer = NULL;
+     }
+     if (avr->resample_needed) {
+         AudioData *resample_out;
+         int consumed = 0;
+         if (!avr->out_convert_needed && output && out_samples > 0)
+             resample_out = &output_buffer;
+         else
+             resample_out = avr->resample_out_buffer;
+         av_dlog(avr, "[resample] %s to %s\n", current_buffer->name,
+                 resample_out->name);
+         ret = ff_audio_resample(avr->resample, resample_out,
+                                 current_buffer, &consumed);
+         if (ret < 0)
+             return ret;
+         /* if resampling did not produce any samples, just return 0 */
+         if (resample_out->nb_samples == 0) {
+             av_dlog(avr, "[end conversion]\n");
+             return 0;
+         }
+         current_buffer = resample_out;
+     }
+     if (avr->upmix_needed) {
+         av_dlog(avr, "[upmix] %s\n", current_buffer->name);
+         ret = ff_audio_mix(avr->am, current_buffer);
+         if (ret < 0)
+             return ret;
+     }
+     /* if we resampled or upmixed directly to output, return here */
+     if (current_buffer == &output_buffer) {
+         av_dlog(avr, "[end conversion]\n");
+         return current_buffer->nb_samples;
+     }
+     if (avr->out_convert_needed) {
+         if (output && out_samples >= current_buffer->nb_samples) {
+             /* convert directly to output */
+             av_dlog(avr, "[convert] %s to output\n", current_buffer->name);
+             ret = ff_audio_convert(avr->ac_out, &output_buffer, current_buffer,
+                                    current_buffer->nb_samples);
+             if (ret < 0)
+                 return ret;
+             av_dlog(avr, "[end conversion]\n");
+             return output_buffer.nb_samples;
+         } else {
+             ret = ff_audio_data_realloc(avr->out_buffer,
+                                         current_buffer->nb_samples);
+             if (ret < 0)
+                 return ret;
+             av_dlog(avr, "[convert] %s to out_buffer\n", current_buffer->name);
+             ret = ff_audio_convert(avr->ac_out, avr->out_buffer,
+                                    current_buffer, current_buffer->nb_samples);
+             if (ret < 0)
+                 return ret;
+             current_buffer = avr->out_buffer;
+         }
+     }
+     return handle_buffered_output(avr, &output_buffer, current_buffer);
+ }
+ int avresample_available(AVAudioResampleContext *avr)
+ {
+     return av_audio_fifo_size(avr->out_fifo);
+ }
+ int avresample_read(AVAudioResampleContext *avr, void **output, int nb_samples)
+ {
+     return av_audio_fifo_read(avr->out_fifo, output, nb_samples);
+ }
+ unsigned avresample_version(void)
+ {
+     return LIBAVRESAMPLE_VERSION_INT;
+ }
+ const char *avresample_license(void)
+ {
+ #define LICENSE_PREFIX "libavresample license: "
 -    return LIBAV_CONFIGURATION;
++    return LICENSE_PREFIX FFMPEG_LICENSE + sizeof(LICENSE_PREFIX) - 1;
+ }
+ const char *avresample_configuration(void)
+ {
++    return FFMPEG_CONFIGURATION;
+ }
Simple merge
Simple merge
@@@ -116,9 -91,7 +116,9 @@@ do_lavf_timecode ismv "-an -vcodec mpeg
  fi
  
  if [ -n "$do_dv_fmt" ] ; then
- do_lavf dv "-ar 48000" "-r 25 -s pal -ac 2"
 +do_lavf_timecode_nodrop dv "-ar 48000 -r 25 -s pal -ac 2"
 +do_lavf_timecode_drop   dv "-ar 48000 -pix_fmt yuv411p -s ntsc -ac 2"
+ do_lavf dv "-ar 48000 -channel_layout stereo" "-r 25 -s pal"
  fi
  
  if [ -n "$do_gxf" ] ; then
@@@ -1,9 -1,3 +1,9 @@@
 -eb51fbb48af28584ea5515f9f2400fcd *./tests/data/lavf/lavf.dv
 +6f9cfff48f536fa727696f2f9fb3ac08 *./tests/data/lavf/lavf.dv
 +3600000 ./tests/data/lavf/lavf.dv
 +./tests/data/lavf/lavf.dv CRC=0x5ce4e5e4
 +cc33ae4f9e6828914dea0f09d1241b7e *./tests/data/lavf/lavf.dv
 +3480000 ./tests/data/lavf/lavf.dv
 +./tests/data/lavf/lavf.dv CRC=0x8d5e9e8f
- b36c83cd0ba0ebe719f09f885c4bbcd3 *./tests/data/lavf/lavf.dv
++87d3b20f656235671383a7eaa2f66330 *./tests/data/lavf/lavf.dv
  3600000 ./tests/data/lavf/lavf.dv
- ./tests/data/lavf/lavf.dv CRC=0x2bc2ae3a
+ ./tests/data/lavf/lavf.dv CRC=0x0e868a82