OSDN Git Service

Merge remote-tracking branch 'qatar/master'
authorMichael Niedermayer <michaelni@gmx.at>
Wed, 27 Jun 2012 22:42:47 +0000 (00:42 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 27 Jun 2012 23:08:52 +0000 (01:08 +0200)
* qatar/master:
  mss1: validate number of changeable palette entries
  mss1: report palette changed when some additional colours were decoded
  x86: fft: replace call to memcpy by a loop
  udp: Support IGMPv3 source specific multicast and source blocking
  dxva2: include dxva.h if found
  libm: Provide fallback definitions for isnan() and isinf()
  tcp: Pass NULL as hostname to getaddrinfo if the string is empty
  tcp: Set AI_PASSIVE when the socket will be used for listening

Conflicts:
configure
libavcodec/mss1.c
libavformat/udp.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
configure
doc/protocols.texi
libavcodec/dxva2_internal.h
libavcodec/mss1.c
libavcodec/x86/fft_mmx.asm
libavformat/tcp.c
libavformat/udp.c
libavutil/libm.h

diff --cc configure
+++ b/configure
@@@ -1215,8 -1094,9 +1216,10 @@@ HAVE_LIST=
      inet_aton
      inline_asm
      isatty
+     isinf
+     isnan
      jack_port_get_latency_range
 +    kbhit
      ldbrx
      libdc1394_1
      libdc1394_2
      soundcard_h
      strerror_r
      strptime
 -    strtok_r
      struct_addrinfo
+     struct_group_source_req
+     struct_ip_mreq_source
      struct_ipv6_mreq
      struct_rusage_ru_maxrss
      struct_sockaddr_in6
@@@ -3177,11 -2875,10 +3186,12 @@@ check_func_headers windows.h GetSystemT
  check_func_headers windows.h MapViewOfFile
  check_func_headers windows.h Sleep
  check_func_headers windows.h VirtualAlloc
 +check_func_headers glob.h glob
  
  check_header dlfcn.h
 -check_header dxva2api.h
+ check_header dxva.h
 +check_header dxva2api.h -D_WIN32_WINNT=0x0600
 +check_header libcrystalhd/libcrystalhd_if.h
  check_header malloc.h
  check_header poll.h
  check_header sys/mman.h
@@@ -566,9 -536,17 +566,17 @@@ and makes writes return with AVERROR(EC
  unreachable" is received.
  For receiving, this gives the benefit of only receiving packets from
  the specified peer address/port.
+ @item sources=@var{address}[,@var{address}]
+ Only receive packets sent to the multicast group from one of the
+ specified sender IP addresses.
+ @item block=@var{address}[,@var{address}]
+ Ignore packets sent to the multicast group from the specified
+ sender IP addresses.
  @end table
  
 -Some usage examples of the udp protocol with @command{avconv} follow.
 +Some usage examples of the udp protocol with @command{ffmpeg} follow.
  
  To stream over UDP to a remote endpoint:
  @example
Simple merge
@@@ -554,10 -554,10 +554,10 @@@ static int decode_pal(MSS1Context *ctx
          r = arith_get_bits(acoder, 8);
          g = arith_get_bits(acoder, 8);
          b = arith_get_bits(acoder, 8);
 -        *pal++ = (r << 16) | (g << 8) | b;
 +        *pal++ = (0xFF << 24) | (r << 16) | (g << 8) | b;
      }
  
-     return 1;
+     return !!ncol;
  }
  
  static int decode_pivot(MSS1Context *ctx, ArithCoder *acoder, int base)
Simple merge
Simple merge
@@@ -529,44 -548,16 +636,49 @@@ static int udp_open(URLContext *h, cons
          }
      }
  
+     for (i = 0; i < num_sources; i++)
+         av_free(sources[i]);
      s->udp_fd = udp_fd;
 +
 +#if HAVE_PTHREAD_CANCEL
 +    if (!is_output && s->circular_buffer_size) {
 +        int ret;
 +
 +        /* start the task going */
 +        s->fifo = av_fifo_alloc(s->circular_buffer_size);
 +        ret = pthread_mutex_init(&s->mutex, NULL);
 +        if (ret != 0) {
 +            av_log(h, AV_LOG_ERROR, "pthread_mutex_init failed : %s\n", strerror(ret));
 +            goto fail;
 +        }
 +        ret = pthread_cond_init(&s->cond, NULL);
 +        if (ret != 0) {
 +            av_log(h, AV_LOG_ERROR, "pthread_cond_init failed : %s\n", strerror(ret));
 +            goto cond_fail;
 +        }
 +        ret = pthread_create(&s->circular_buffer_thread, NULL, circular_buffer_task, h);
 +        if (ret != 0) {
 +            av_log(h, AV_LOG_ERROR, "pthread_create failed : %s\n", strerror(ret));
 +            goto thread_fail;
 +        }
 +        s->thread_started = 1;
 +    }
 +#endif
 +
      return 0;
 +#if HAVE_PTHREAD_CANCEL
 + thread_fail:
 +    pthread_cond_destroy(&s->cond);
 + cond_fail:
 +    pthread_mutex_destroy(&s->mutex);
 +#endif
   fail:
      if (udp_fd >= 0)
          closesocket(udp_fd);
 +    av_fifo_free(s->fifo);
+     for (i = 0; i < num_sources; i++)
+         av_free(sources[i]);
      return AVERROR(EIO);
  }
  
  #include <math.h>
  #include "config.h"
  #include "attributes.h"
+ #include "intfloat.h"
  
 +#if HAVE_MIPSFPU && HAVE_INLINE_ASM
 +#include "libavutil/mips/libm_mips.h"
 +#endif /* HAVE_MIPSFPU && HAVE_INLINE_ASM*/
 +
  #if !HAVE_CBRTF
  static av_always_inline float cbrtf(float x)
  {