Merge remote-tracking branch 'qatar/master'
authorMichael Niedermayer <michaelni@gmx.at>
Sun, 21 Aug 2011 13:27:02 +0000 (15:27 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 21 Aug 2011 13:27:02 +0000 (15:27 +0200)
* qatar/master:
  WavPack demuxer: do not rely on index when timestamp is not in indexed range.
  WavPack demuxer: store position of the first block in index.
  WavPack decoder: implement flush function
  avconv: Separate initialization from the main transcode loop.

Conflicts:
avconv.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
avconv.c
libavcodec/wavpack.c
libavformat/wv.c

diff --cc avconv.c
+++ b/avconv.c
@@@ -2277,11 -2209,34 +2262,38 @@@ static int transcode_init(OutputFile *o
          print_sdp(output_files, nb_output_files);
      }
  
 -    if (verbose >= 0)
 -        fprintf(stderr, "Press ctrl-c to stop encoding\n");
+     return 0;
+ }
+ /*
+  * The following code is the main loop of the file converter
+  */
+ static int transcode(OutputFile *output_files,
+                      int nb_output_files,
+                      InputFile *input_files,
+                      int nb_input_files)
+ {
+     int ret, i;
+     AVFormatContext *is, *os;
+     OutputStream *ost;
+     InputStream *ist;
+     uint8_t *no_packet;
+     int no_packet_count=0;
+     int64_t timer_start;
++    int key;
+     if (!(no_packet = av_mallocz(nb_input_files)))
+         exit_program(1);
+     ret = transcode_init(output_files, nb_output_files, input_files, nb_input_files);
+     if (ret < 0)
+         goto fail;
 +    if (!using_stdin) {
 +        if(verbose >= 0)
 +            fprintf(stderr, "Press [q] to stop, [?] for help\n");
 +        avio_set_interrupt_cb(decode_interrupt_cb);
 +    }
      term_init();
  
      timer_start = av_gettime();
Simple merge
@@@ -250,8 -250,9 +250,9 @@@ static int wv_read_packet(AVFormatConte
      WVContext *wc = s->priv_data;
      int ret;
      int size, ver, off;
+     int64_t pos;
  
 -    if (s->pb->eof_reached)
 +    if (url_feof(s->pb))
          return AVERROR(EIO);
      if(wc->block_parsed){
          if(wv_read_block_header(s, s->pb, 0) < 0)