Merge remote-tracking branch 'qatar/master' n0.11-dev
authorMichael Niedermayer <michaelni@gmx.at>
Fri, 27 Jan 2012 00:42:53 +0000 (01:42 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Fri, 27 Jan 2012 01:09:58 +0000 (02:09 +0100)
* qatar/master:
  smacker: Sanity check huffman tables found in the headers.
  smacker: remove dead store
  qdm2: Check data block size for bytes to bits overflow.
  mxfdec: Fix files with essence containers larger than 2 GiB.
  mxfdec: Employ correct printf conversion specifiers for POSIX int types.
  vc1: always read the bfraction element for interlaced fields
  fate: add XWD image regression test
  lavf: prevent infinite loops while flushing in avformat_find_stream_info
  matroskadec: Pad AAC extradata.
  ismindex: Fix build on mingw

Conflicts:
libavformat/mxfdec.c
libavformat/utils.c
tests/lavf-regression.sh

Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
libavcodec/smacker.c
libavcodec/vc1.c
libavformat/mxfdec.c
libavformat/utils.c
tests/lavf-regression.sh
tests/ref/lavf/xwd

Simple merge
Simple merge
Simple merge
@@@ -2283,10 -2178,9 +2284,11 @@@ static int try_decode_frame(AVStream *s
                  st->info->nb_decoded_frames++;
              pkt.data += ret;
              pkt.size -= ret;
+             ret       = got_picture;
          }
      }
 +    if(!pkt.data && !got_picture)
 +        return -1;
      return ret;
  }
  
@@@ -2579,32 -2490,6 +2581,37 @@@ int avformat_find_stream_info(AVFormatC
          count++;
      }
  
-             while ((err = try_decode_frame(st, &empty_pkt,
 +    if (flush_codecs) {
 +        AVPacket empty_pkt = { 0 };
 +        int err;
 +        av_init_packet(&empty_pkt);
 +
 +        ret = -1; /* we could not have all the codec parameters before EOF */
 +        for(i=0;i<ic->nb_streams;i++) {
 +            st = ic->streams[i];
 +
 +            /* flush the decoders */
-                                             &options[i] : NULL)) >= 0)
-                 if (has_codec_parameters(st->codec))
-                     break;
++            do {
++                err = try_decode_frame(st, &empty_pkt,
 +                                           (options && i < orig_nb_streams) ?
-                 av_log(ic, AV_LOG_WARNING, "Could not find codec parameters (%s)\n", buf);
++                                           &options[i] : NULL);
++            } while (err > 0 && !has_codec_parameters(st->codec));
 +
++            if (err < 0) {
++                av_log(ic, AV_LOG_INFO,
++                       "decoding for stream %d failed\n", st->index);
++            }
 +            if (!has_codec_parameters(st->codec)){
 +                char buf[256];
 +                avcodec_string(buf, sizeof(buf), st->codec, 0);
++                av_log(ic, AV_LOG_WARNING,
++                       "Could not find codec parameters (%s)\n", buf);
 +            } else {
 +                ret = 0;
 +            }
 +        }
 +    }
 +
      // close codecs which were opened in try_decode_frame()
      for(i=0;i<ic->nb_streams;i++) {
          st = ic->streams[i];
@@@ -183,10 -175,10 +183,14 @@@ if [ -n "$do_pcx" ] ; the
  do_image_formats pcx
  fi
  
 +if [ -n "$do_dpx" ] ; then
 +do_image_formats dpx
 +fi
 +
+ if [ -n "$do_xwd" ] ; then
+ do_image_formats xwd
+ fi
  # audio only
  
  if [ -n "$do_wav" ] ; then
index 0000000,3461838..6ba88cd
mode 000000,100644..100644
--- /dev/null
@@@ -1,0 -1,3 +1,3 @@@
 -b838561f7df803ea14dd6307a9d3c5ec *./tests/data/images/xwd/02.xwd
 -./tests/data/images/xwd/%02d.xwd CRC=0x69b329cd
 -405615 ./tests/data/images/xwd/02.xwd
++0ab6cd4fe5fe85a3f3e87508c2eadfa0 *./tests/data/images/xwd/02.xwd
++./tests/data/images/xwd/%02d.xwd CRC=0x6da01946
++304239 ./tests/data/images/xwd/02.xwd