Merge remote-tracking branch 'qatar/master'

* 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>
This commit is contained in:
Michael Niedermayer
2012-06-28 00:42:47 +02:00
8 changed files with 184 additions and 30 deletions

View File

@@ -557,7 +557,7 @@ static int decode_pal(MSS1Context *ctx, ArithCoder *acoder)
*pal++ = (0xFF << 24) | (r << 16) | (g << 8) | b;
}
return 1;
return !!ncol;
}
static int decode_pivot(MSS1Context *ctx, ArithCoder *acoder, int base)
@@ -783,8 +783,10 @@ static av_cold int mss1_decode_init(AVCodecContext *avctx)
av_log(avctx, AV_LOG_DEBUG, "Encoder version %d.%d\n",
AV_RB32(avctx->extradata + 4), AV_RB32(avctx->extradata + 8));
c->free_colours = AV_RB32(avctx->extradata + 48);
if (c->free_colours < 0 || c->free_colours > 256) {
av_log(avctx, AV_LOG_ERROR, "Invalid free colours %d\n", c->free_colours);
if ((unsigned)c->free_colours > 256) {
av_log(avctx, AV_LOG_ERROR,
"Incorrect number of changeable palette entries: %d\n",
c->free_colours);
return AVERROR_INVALIDDATA;
}
av_log(avctx, AV_LOG_DEBUG, "%d free colour(s)\n", c->free_colours);