idct: remove call to ff_idctdsp_init from ff_MPV_common_init

One step in untangling the mpegvideo code and fixing some problems in
the order that initialization is being done in h263dec and h261dec.
h263dec: Fix order of initialization

ff_MPV_common_init requires the frame dimensions which get parsed in
*_decode_picture_header.
h261dec: Fix order of initialization

ff_MPV_common_init requires the frame dimensions which get parsed in
h261_decode_picture_header.
Merge commit '998c9f15d1ca8c7489775ebcca51623b915988f1'

* commit '998c9f15d1ca8c7489775ebcca51623b915988f1':
  idct: remove call to ff_idctdsp_init from ff_MPV_common_init

Conflicts:
	libavcodec/dnxhdenc.c
	libavcodec/h263dec.c
	libavcodec/mpegvideo.c
	libavcodec/mpegvideo.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit 'b869eea7ea8f5d8331fcd6355f848bb6a6e06b14'

* commit 'b869eea7ea8f5d8331fcd6355f848bb6a6e06b14':
  h263dec: Fix order of initialization

Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit '552bc42df48784ae3ce0d499ece5b33f3cc7576a'

* commit '552bc42df48784ae3ce0d499ece5b33f3cc7576a':
  h261dec: Fix order of initialization

Merged-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/h261dec: Fix context initialization sequence

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
ffmpeg: fix streamcopy with side data

The issue is that, when the main packet data buffer is changed, streamcopy
uses a temporary new packet to store that buffer, frees the old packet, and
replace it with the new packet.

However, in doing so, it forgets about the side data, which gets freed, but
is still needed and referenced. Then, when the packet gets freed again in
the normal code path, it attempts to free its side data which has already
been freed.

Therefore, simply avoid the first free on side data by removing that side
data from the packet.

Fixes ticket #3773.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
ffmpeg: remove 32 channel limit from audio_channels_map

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
http: Reduce scope of a variable in parse_content_encoding()

Also fixes an unused variable warning with zlib disabled.
w32pthreads: Mark functions in compatibility wrapper as av_unused

This avoids annoying warnings about unused functions. The compatibility
wrapper is designed to provide a complete (stub) API, so some functions
being unused by some files is natural and no reason for a warning.
atomic_win32: Drop unnecessary atomic.h #include

The file does not require atomic.h. Also kills function redefinition warnings.
vfwcap: Replace deprecated av_destruct_packet() by av_free_packet()
mpegvideo: cosmetics: Lowercase ugly uppercase MPV_ function name prefixes
build: Add explanatory comments to (optimization) blocks in the Makefiles
Merge commit '7ccb847f0f1f28199fa254847b91b6e50fb92832'

* commit '7ccb847f0f1f28199fa254847b91b6e50fb92832':
  http: Reduce scope of a variable in parse_content_encoding()

Merged-by: Michael Niedermayer <michaelni@gmx.at>
cosmetics: Write NULL pointer equality checks more compactly

Signed-off-by: Diego Biurrun <diego@biurrun.de>
Merge commit '6baeadd11083774ebd823dd5e1a744c2150a3bfc'

* commit '6baeadd11083774ebd823dd5e1a744c2150a3bfc':
  w32pthreads: Mark functions in compatibility wrapper as av_unused

Conflicts:
	compat/w32pthreads.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit '7c371754fbc0dcc23bd00278b147f8095ccc5625'

* commit '7c371754fbc0dcc23bd00278b147f8095ccc5625':
  atomic_win32: Drop unnecessary atomic.h #include

Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit 'a6a27fede94efe48aad1dcc9d5e000d2de71c7b2'

* commit 'a6a27fede94efe48aad1dcc9d5e000d2de71c7b2':
  vfwcap: Replace deprecated av_destruct_packet() by av_free_packet()

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