]> git.sesse.net Git - ffmpeg/commitdiff
Merge remote-tracking branch 'qatar/master'
authorMichael Niedermayer <michaelni@gmx.at>
Sat, 21 Jan 2012 00:33:31 +0000 (01:33 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Sat, 21 Jan 2012 00:33:31 +0000 (01:33 +0100)
* qatar/master:
  Add a tool that uses avio to read and write, doing a plain copy of data
  ARM: fix build with FFT enabled and MDCT disabled
  lavf: force single-threaded decoding in avformat_find_stream_info
  avidec: migrate last of lavf from FF_ER_* to AV_EF_*
  avserver: fix build after the next bump.

Conflicts:
libavformat/Makefile
libavformat/avidec.c
libavformat/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
ffserver.c
libavcodec/arm/fft_init_arm.c
libavformat/Makefile
libavformat/avidec.c
libavformat/utils.c

diff --cc ffserver.c
index c225a94e3b2bdbf47131674c57b5d441af668d14,f3ac319ef93ecfe386e881f41095a947eb2879be..79463c0e64981927c5a6025ea7751bde6fa77f88
@@@ -2252,10 -2248,9 +2255,9 @@@ static int http_prepare_data(HTTPContex
  
          /*
           * HACK to avoid mpeg ps muxer to spit many underflow errors
 -         * Default value from Libav
 +         * Default value from FFmpeg
           * Try to set it use configuration option
           */
-         c->fmt_ctx.preload   = (int)(0.5*AV_TIME_BASE);
          c->fmt_ctx.max_delay = (int)(0.7*AV_TIME_BASE);
  
          if (avformat_write_header(&c->fmt_ctx, NULL) < 0) {
Simple merge
index c135eb867530074602f0c7acb12fbfdc0c91b81e,2a2a946104321cea38a7028a84f35ab42ea227d6..7c7cea5aad361e0e490c1fc966740d6d1390b774
@@@ -373,5 -351,9 +373,5 @@@ OBJS-$(CONFIG_TLS_PROTOCOL
  OBJS-$(CONFIG_UDP_PROTOCOL)              += udp.o
  
  SKIPHEADERS-$(CONFIG_NETWORK)            += network.h rtsp.h
 -
 -EXAMPLES  = metadata output
  TESTPROGS = seek
- TOOLS     = pktdumper probetest
+ TOOLS     = aviocat pktdumper probetest
 -
 -$(SUBDIR)output-example$(EXESUF): ELIBS = -lswscale
index 76dda0f8f7fed1f104a29d4796e7f708bb4cfcd9,b4ccfb50f8a928f850207f6f82db9480cef2bf3f..1740c9e0473f1f388ee4378ea249f336f234141e
@@@ -698,34 -663,12 +698,34 @@@ static int avi_read_header(AVFormatCont
                  }
              }
              break;
 +        case MKTAG('s', 't', 'r', 'd'):
 +            if (stream_index >= (unsigned)s->nb_streams || st->codec->extradata_size) {
 +                avio_skip(pb, size);
 +            } else {
 +                uint64_t cur_pos = avio_tell(pb);
 +                if (cur_pos < list_end)
 +                    size = FFMIN(size, list_end - cur_pos);
 +                st = s->streams[stream_index];
 +
 +                if(size<(1<<30)){
 +                    st->codec->extradata_size= size;
 +                    st->codec->extradata= av_malloc(st->codec->extradata_size + FF_INPUT_BUFFER_PADDING_SIZE);
 +                    if (!st->codec->extradata) {
 +                        st->codec->extradata_size= 0;
 +                        return AVERROR(ENOMEM);
 +                    }
 +                    avio_read(pb, st->codec->extradata, st->codec->extradata_size);
 +                }
 +
 +                if(st->codec->extradata_size & 1) //FIXME check if the encoder really did this correctly
 +                    avio_r8(pb);
 +            }
 +            break;
          case MKTAG('i', 'n', 'd', 'x'):
              i= avio_tell(pb);
 -            if(pb->seekable && !(s->flags & AVFMT_FLAG_IGNIDX) &&
 -               read_braindead_odml_indx(s, 0) < 0 &&
 -               (s->error_recognition & AV_EF_EXPLODE))
 +            if(pb->seekable && !(s->flags & AVFMT_FLAG_IGNIDX) && avi->use_odml &&
-                read_braindead_odml_indx(s, 0) < 0 && s->error_recognition >= FF_ER_EXPLODE){
-                 goto fail;            }
++               read_braindead_odml_indx(s, 0) < 0 && s->error_recognition >= FF_ER_EXPLODE)
+                 goto fail;
              avio_seek(pb, i+size, SEEK_SET);
              break;
          case MKTAG('v', 'p', 'r', 'p'):
              if(size > 1000000){
                  av_log(s, AV_LOG_ERROR, "Something went wrong during header parsing, "
                                          "I will ignore it and try to continue anyway.\n");
-                 if (s->error_recognition >= FF_ER_EXPLODE) goto fail;
+                 if (s->error_recognition & AV_EF_EXPLODE)
+                     goto fail;
                  avi->movi_list = avio_tell(pb) - 4;
 -                avi->movi_end  = avio_size(pb);
 +                avi->movi_end  = avi->fsize;
                  goto end_of_header;
              }
              /* skip tag */
index 9409ebe671215efecd9cf73c9a104e15514125c3,22ee13b51f97fb794f6c621608a63dddf3584d1f..9e3f775d43ea2ba1c1c21da15254df1b94a54951
@@@ -2384,15 -2284,12 +2392,13 @@@ int avformat_find_stream_info(AVFormatC
      int i, count, ret, read_size, j;
      AVStream *st;
      AVPacket pkt1, *pkt;
-     AVDictionary *one_thread_opt = NULL;
      int64_t old_offset = avio_tell(ic->pb);
      int orig_nb_streams = ic->nb_streams;        // new streams might appear, no options for those
 +    int flush_codecs = 1;
  
-     av_dict_set(&one_thread_opt, "threads", "1", 0);
      for(i=0;i<ic->nb_streams;i++) {
          AVCodec *codec;
+         AVDictionary *thread_opt = NULL;
          st = ic->streams[i];
  
          if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO ||