]> git.sesse.net Git - ffmpeg/commitdiff
Merge remote-tracking branch 'qatar/master'
authorMichael Niedermayer <michaelni@gmx.at>
Sat, 21 Jan 2012 22:11:27 +0000 (23:11 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Sat, 21 Jan 2012 22:11:27 +0000 (23:11 +0100)
* qatar/master:
  rtpdec: Use our own SSRC in the SDES field when sending RRs
  Finalize changelog for 0.8 Release
  Prepare for 0.8 Release
  threads: change the default for threads back to 1
  threads: update slice_count and slice_offset from user context
  aviocat: Remove useless includes
  doc/APIChanges: fill in missing dates and hashes
  Revert "avserver: fix build after the next bump."
  mpegaudiodec: switch error detection check to AV_EF_BUFFER
  lavf: rename fer option and document resulting (f_)err_detect options
  lavc: rename err_filter option to err_detect and document it
  mpegvideo: fix invalid memory access for small video dimensions
  movenc: Reorder entries in the MOVIentry struct, for tigheter packing
  rtsp: Remove extern declarations for variables that don't exist
  aviocat: Flush the output before closing

Conflicts:
Changelog
RELEASE
libavcodec/mpegaudiodec.c
libavcodec/pthread.c
libavformat/options.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
14 files changed:
1  2 
RELEASE
avconv.c
doc/APIchanges
ffplay.c
ffserver.c
libavcodec/mpegaudiodec.c
libavcodec/mpegvideo.c
libavcodec/mpegvideo_common.h
libavcodec/options.c
libavcodec/pthread.c
libavformat/movenc.h
libavformat/options.c
libavformat/rtpdec.c
libavformat/rtsp.h

diff --cc RELEASE
index ba03fc9fdb051a853cbb510e80bebd9aeea06724,aec258df73d39d2122706793921981f4a0f672f8..4fda45b3761fb3b27a5d1f22bcd8ed216f5f0991
+++ b/RELEASE
@@@ -1,2 -1,1 +1,1 @@@
 -0.8
 +0.9.1.git
diff --cc avconv.c
Simple merge
diff --cc doc/APIchanges
index 4dfd6e02af8b7862ffc76ca10c3772fd320c2399,904e3462f76b74bbe8eba0c33fbb7a10aab44379..93591626ca3313de923970b2ba9a0741ffa31428
@@@ -13,37 -13,33 +13,37 @@@ libavutil:   2011-04-1
  
  API changes, most recent first:
  
- 2012-xx-xx - lavc 53.34.0
+ 2012-01-15 - lavc 53.34.0
    New audio encoding API:
-   xxxxxxx Add CODEC_CAP_VARIABLE_FRAME_SIZE capability for use by audio
+   b2c75b6 Add CODEC_CAP_VARIABLE_FRAME_SIZE capability for use by audio
            encoders.
-   xxxxxxx Add avcodec_fill_audio_frame() as a convenience function.
-   xxxxxxx Add avcodec_encode_audio2() and deprecate avcodec_encode_audio().
+   5ee5fa0 Add avcodec_fill_audio_frame() as a convenience function.
+   b2c75b6 Add avcodec_encode_audio2() and deprecate avcodec_encode_audio().
            Add AVCodec.encode2().
  
- 2012-01-xx - xxxxxxx - lavfi 2.15.0
+ 2012-01-12 - 3167dc9 - lavfi 2.15.0
    Add a new installed header -- libavfilter/version.h -- with version macros.
  
 -2011-01-03 - b73ec05 - lavu 51.21.0
 -  Add av_popcount64
 +2011-12-08 - a502939 - lavfi 2.52.0
 +  Add av_buffersink_poll_frame() to buffersink.h.
 +
 +2011-12-08 - xxxxxxx - lavu 51.31.0
 +  Add av_log_format_line.
 +
 +2011-12-03 - xxxxxxx - lavu 51.30.0
 +  Add AVERROR_BUG.
  
 -2011-12-25 - lavfi 2.14.0
 -  e1d9dbf Add a new installed header - buffersrc.h
 -  It contains a new function av_buffersrc_buffer() that allows passing
 -  frames to the 'buffer' filter, but unlike av_vsrc_buffer_add_frame()
 -  it allows for direct rendering.
 -  1c9e340 Add avfilter_copy_frame_props() for copying properties from
 -  AVFrame to AVFilterBufferRef.
 +2011-xx-xx - xxxxxxx - lavu 51.28.1
 +  Add av_get_alt_sample_fmt() to samplefmt.h.
  
 -2011-12-25 - lavc 53.31.0
 -  Add the following new fields to AVFrame:
 -    b58dbb5 sample_aspect_ratio
 -    3a2ddf7 width, height
 -    8a4a5f6 format
 +2011-11-03 - 96949da - lavu 51.23.0
 +  Add av_strcasecmp() and av_strncasecmp() to avstring.h.
 +
 +2011-10-20 - b35e9e1 - lavu 51.22.0
 +  Add av_strtok() to avstring.h.
 +
 +2011-01-03 - b73ec05 - lavu 51.21.0
 +  Add av_popcount64
  
  2011-12-18 - 8400b12 - lavc 53.28.1
    Deprecate AVFrame.age. The field is unused.
diff --cc ffplay.c
index 4fd8b36a151cd8f823e816c8f8b40735d8e62677,432afc11b3d770da4a739f7b0e1c9bfd98288978..babdcb9954f5573487185e03590d9c8050d45176
+++ b/ffplay.c
@@@ -2238,34 -2189,13 +2238,36 @@@ static int stream_component_open(VideoS
      avctx->skip_loop_filter  = skip_loop_filter;
      avctx->error_recognition = error_recognition;
      avctx->error_concealment = error_concealment;
 -    avctx->thread_count      = thread_count;
  
 -    if (lowres) avctx->flags  |= CODEC_FLAG_EMU_EDGE;
 +    if(avctx->lowres) avctx->flags |= CODEC_FLAG_EMU_EDGE;
      if (fast)   avctx->flags2 |= CODEC_FLAG2_FAST;
 +    if(codec->capabilities & CODEC_CAP_DR1)
 +        avctx->flags |= CODEC_FLAG_EMU_EDGE;
 +
 +    if (avctx->codec_type == AVMEDIA_TYPE_AUDIO) {
 +        env = SDL_getenv("SDL_AUDIO_CHANNELS");
 +        if (env)
 +            wanted_channel_layout = av_get_default_channel_layout(SDL_atoi(env));
 +        if (!wanted_channel_layout) {
 +            wanted_channel_layout = (avctx->channel_layout && avctx->channels == av_get_channel_layout_nb_channels(avctx->channel_layout)) ? avctx->channel_layout : av_get_default_channel_layout(avctx->channels);
 +            wanted_channel_layout &= ~AV_CH_LAYOUT_STEREO_DOWNMIX;
 +            wanted_nb_channels = av_get_channel_layout_nb_channels(wanted_channel_layout);
 +            /* SDL only supports 1, 2, 4 or 6 channels at the moment, so we have to make sure not to request anything else. */
 +            while (wanted_nb_channels > 0 && (wanted_nb_channels == 3 || wanted_nb_channels == 5 || wanted_nb_channels > 6)) {
 +                wanted_nb_channels--;
 +                wanted_channel_layout = av_get_default_channel_layout(wanted_nb_channels);
 +            }
 +        }
 +        wanted_spec.channels = av_get_channel_layout_nb_channels(wanted_channel_layout);
 +        wanted_spec.freq = avctx->sample_rate;
 +        if (wanted_spec.freq <= 0 || wanted_spec.channels <= 0) {
 +            fprintf(stderr, "Invalid sample rate or channel count!\n");
 +            return -1;
 +        }
 +    }
  
+     if (!av_dict_get(opts, "threads", NULL, 0))
+         av_dict_set(&opts, "threads", "auto", 0);
      if (!codec ||
          avcodec_open2(avctx, codec, &opts) < 0)
          return -1;
diff --cc ffserver.c
index 79463c0e64981927c5a6025ea7751bde6fa77f88,15fa64c144da7dc078a22f5c3eaf1e57549f548f..c225a94e3b2bdbf47131674c57b5d441af668d14
@@@ -2255,9 -2245,10 +2252,10 @@@ 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) {
index 18ef40e01116494ae4ed1fbbad4ebfd2bf96979c,a83b1621fd9de7c44335f5e962fca7daf6e0eeea..51b197081cb16d6d0b8dc0c157dfe176c837844d
@@@ -987,10 -985,10 +987,10 @@@ static int huffman_decode(MPADecodeCont
      /* skip extension bits */
      bits_left = end_pos2 - get_bits_count(&s->gb);
  //av_log(NULL, AV_LOG_ERROR, "left:%d buf:%p\n", bits_left, s->in_gb.buffer);
-     if (bits_left < 0 && (s->err_recognition & (AV_EF_BITSTREAM|AV_EF_COMPLIANT))) {
 -    if (bits_left < 0 && (s->err_recognition & AV_EF_BUFFER)) {
++    if (bits_left < 0 && (s->err_recognition & (AV_EF_BUFFER|AV_EF_COMPLIANT))) {
          av_log(s->avctx, AV_LOG_ERROR, "bits_left=%d\n", bits_left);
          s_index=0;
-     } else if (bits_left > 0 && (s->err_recognition & (AV_EF_BITSTREAM|AV_EF_AGGRESSIVE))) {
 -    } else if (bits_left > 0 && (s->err_recognition & AV_EF_BUFFER)) {
++    } else if (bits_left > 0 && (s->err_recognition & (AV_EF_BUFFER|AV_EF_AGGRESSIVE))) {
          av_log(s->avctx, AV_LOG_ERROR, "bits_left=%d\n", bits_left);
          s_index = 0;
      }
Simple merge
Simple merge
Simple merge
index fe3dbdad5ac1692ea62060033e23a4e01059c54b,a4e3081272d57fb65e34f82738d293113ea263af..e0921e4e0634f9ad7bc190ba1471d6eb83cf8435
@@@ -477,7 -469,22 +477,23 @@@ static int update_context_from_user(AVC
  
      dst->frame_number     = src->frame_number;
      dst->reordered_opaque = src->reordered_opaque;
 +    dst->thread_safe_callbacks = src->thread_safe_callbacks;
+     if (src->slice_count && src->slice_offset) {
+         if (dst->slice_count < src->slice_count) {
+             int *tmp = av_realloc(dst->slice_offset, src->slice_count *
+                                   sizeof(*dst->slice_offset));
+             if (!tmp) {
+                 av_free(dst->slice_offset);
+                 return AVERROR(ENOMEM);
+             }
+             dst->slice_offset = tmp;
+         }
+         memcpy(dst->slice_offset, src->slice_offset,
+                src->slice_count * sizeof(*dst->slice_offset));
+     }
+     dst->slice_count = src->slice_count;
+     return 0;
  #undef copy_fields
  }
  
index f6c95adea36834b7001d76726707032669d99c37,5595ac71a84fbaed2d59630e1d32e274ae8a281a..ac6573b821032d3e53bf83102f3afd17485ae295
  #define MODE_IPOD 0x20
  
  typedef struct MOVIentry {
-     unsigned int size;
      uint64_t     pos;
+     int64_t      dts;
+     unsigned int size;
      unsigned int samplesInChunk;
 +    unsigned int chunkNum;              ///< Chunk number if the current entry is a chunk start otherwise 0
      unsigned int entries;
      int          cts;
-     int64_t      dts;
  #define MOV_SYNC_SAMPLE         0x0001
  #define MOV_PARTIAL_SYNC_SAMPLE 0x0002
      uint32_t     flags;
index 2584153b91add0248e1a9ceb4deb661ac56e4c46,7c75bf48fc4d7ac485a1e561e5ff034be6301a09..3e6dccf17fe1f88077028eafd909fd70c98efc12
@@@ -112,13 -109,15 +112,18 @@@ static const AVOption options[]=
  {"fdebug", "print specific debug info", OFFSET(debug), AV_OPT_TYPE_FLAGS, {.dbl = DEFAULT }, 0, INT_MAX, E|D, "fdebug"},
  {"ts", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_FDEBUG_TS }, INT_MIN, INT_MAX, E|D, "fdebug"},
  {"max_delay", "maximum muxing or demuxing delay in microseconds", OFFSET(max_delay), AV_OPT_TYPE_INT, {.dbl = DEFAULT }, 0, INT_MAX, E|D},
- {"fer", "set error detection aggressivity", OFFSET(error_recognition), AV_OPT_TYPE_INT, {.dbl = FF_ER_CAREFUL }, INT_MIN, INT_MAX, D, "fer"},
- {"careful", NULL, 0, AV_OPT_TYPE_CONST, {.dbl = FF_ER_CAREFUL }, INT_MIN, INT_MAX, D, "fer"},
- {"explode", "abort decoding on error recognition", 0, AV_OPT_TYPE_CONST, {.dbl = FF_ER_EXPLODE }, INT_MIN, INT_MAX, D, "fer"},
  {"fpsprobesize", "number of frames used to probe fps", OFFSET(fps_probe_size), AV_OPT_TYPE_INT, {.dbl = -1}, -1, INT_MAX-1, D},
 +{"audio_preload", "microseconds by which audio packets should be interleaved earlier", OFFSET(audio_preload), AV_OPT_TYPE_INT, {.dbl = 0}, 0, INT_MAX-1, E},
 +{"chunk_duration", "microseconds for each chunk", OFFSET(max_chunk_duration), AV_OPT_TYPE_INT, {.dbl = 0}, 0, INT_MAX-1, E},
 +{"chunk_size", "size in bytes for each chunk", OFFSET(max_chunk_size), AV_OPT_TYPE_INT, {.dbl = 0}, 0, INT_MAX-1, E},
+ /* this is a crutch for avconv, since it cannot deal with identically named options in different contexts.
+  * to be removed when avconv is fixed */
+ {"f_err_detect", "set error detection flags (deprecated; use err_detect, save via avconv)", OFFSET(error_recognition), AV_OPT_TYPE_FLAGS, {.dbl = AV_EF_CRCCHECK }, INT_MIN, INT_MAX, D, "err_detect"},
+ {"err_detect", "set error detection flags", OFFSET(error_recognition), AV_OPT_TYPE_FLAGS, {.dbl = AV_EF_CRCCHECK }, INT_MIN, INT_MAX, D, "err_detect"},
+ {"crccheck", "verify embedded CRCs", 0, AV_OPT_TYPE_CONST, {.dbl = AV_EF_CRCCHECK }, INT_MIN, INT_MAX, D, "err_detect"},
+ {"bitstream", "detect bitstream specification deviations", 0, AV_OPT_TYPE_CONST, {.dbl = AV_EF_BITSTREAM }, INT_MIN, INT_MAX, D, "err_detect"},
+ {"buffer", "detect improper bitstream length", 0, AV_OPT_TYPE_CONST, {.dbl = AV_EF_BUFFER }, INT_MIN, INT_MAX, D, "err_detect"},
+ {"explode", "abort decoding on minor error detection", 0, AV_OPT_TYPE_CONST, {.dbl = AV_EF_EXPLODE }, INT_MIN, INT_MAX, D, "err_detect"},
  {NULL},
  };
  
Simple merge
Simple merge