asfenc: return error on negative timestamp

According to the specification the timestamp is represented by a 32bit
unsigned.

CC: libav-stable@libav.org
iff: validate CMAP palette size

Fixes CVE-2013-2495

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>

CC: libav-stable@libav.org
mpeg12: do not fail on zero dimensions in the sequence header.

The total frame size is a combination of the 12 bits in the sequence
header and 2 more bits in the the sequence extension. While the
specification explicitly forbids the dimensions from the sequence header
from being 0 (thus ruling out multiples of 4096), such videos
apparrently exist in the wild so we should attempt to decode them.

Based on a patch by Michael Niedermayer <michaelni@gmx.at>

Fixes Bug 416.
print_options: do not generate docs for options without enc or dec flags

Those are not usable from the avtools, so mentioning them in the
manpages just confuses the reader.
Merge commit '50c449ac24fbb4c03c15d2e2026cef2204b80385'

* commit '50c449ac24fbb4c03c15d2e2026cef2204b80385':
  iff: validate CMAP palette size
  asfenc: return error on negative timestamp

Conflicts:
	libavformat/iff.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge remote-tracking branch 'qatar/master'

* qatar/master:
  print_options: do not generate docs for options without enc or dec flags
  mpeg12: do not fail on zero dimensions in the sequence header.

Conflicts:
	libavcodec/mpeg12.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
mpeg2: 12LSB w/h of 0 is not allowed in compliant videos thus this also needs AV_EF_COMPLIANT

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
append_packet_chunked: remove outcommented code

our variant works fine and should be better
also remove related unused variable

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avutil/buffer: Fix race in pool.

This race will always happen sooner or later in a multi-threaded
environment and it will over time lead to OOM.
This fix works by spinning, there are other ways by which this
can be fixed, like simply detecting the issue after it happened
and freeing the over-allocated memory or simply using a mutex.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/proresdec.h: fix license header

This was somehow missed when relicensing the decoder to LGPL

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavdevice sdl: added window_fullscreen option to switch SDL output into fullscreen mode
lavc: fix avpacket memleak with subtitles recoding.
doc: try to improve avoid_negative_ts documentation

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
doc: Document the order in which avoid_negative_ts is applied compared to other timestamp options

Also try to document the rational behind it.

This might fix Ticket2376

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Fix termination of mov_ch_layouts_wav array lookup

Problem found using ASAN.
In some case, the ff_mov_get_channel_layout_tag function will not find 0
as termination for lookup in the array mov_ch_layouts_wav.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
segment: copy metadata

Fixes Ticket2230

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
AVFrame.pkt_dts: improve docs

Related to Ticket2375

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Inform the user if a pix_fmt != yuv420p was chosen for x264 encoding.
Fix Makefile dependency for the dvd_nav parser.

Fixes compilation for --disable-everything --enable-parser=dvd_nav
pthread: update all get_buffer checks for get_buffer2

This restores the performance of simple frame-threaded codecs back to
their pre-merge levels.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>