lavc/decode_video(): always unref the frame if there is no output in decode_video

Not just on failure. This is the same thing that is done in the audio
path and should prevent leaks in decoders that allocate a frame, but
then end up not writing into it.
frame: copy flags in av_frame_copy_props()

Flags can be considered metadata (at least those that are defined now).
frame: cosmetics, reindent
lavc: rework handling of refcounted_frames=0

Use only proper AVFrame API (no assigning of whole frames, since that
hardcodes sizeof(AVFrame) into lavc).

Make a copy of the side data, so the caller can use av_frame_unref/free
on non-refcounted frames, eliminating the need for
avcodec_get_frame_defaults()/avcodec_free_frame().
ac3dec: make drc_scale exponentially

The a52 spec suggests that "partial compression" should scale the
drc value in this manner.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
dv: use AVFrame API properly
avcodec: Use av_reallocp where suitable

Signed-off-by: Martin Storsjö <martin@martin.st>
configure: detect Solaris libc

Add preprocessor flags for API availability as necessary.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
configure: Prefix libc-related variables with "libc_"

Simplifies host/target libc detection splitting.
Do not detect "00000000..." (and other non-changing values) as adp.
Fix remuxing of IMA_QT in mov.

Fixes ticket #1603.
avframe: add codec-independent stereoscopic metadata
h264: parse frame packing arrangement SEI messages and save relevant stereo3d information
libx264: set frame packing information when relevant information is found
mpeg12dec: parse frame packing arrangement user_data and save relevant stereo3d information
mpeg12enc: set frame packing information when relevant metadata is found
hevc: parse frame packing arrangement SEI messages and save relevant stereo3d information
Merge commit 'a1ee1648690726b34e98eaf8db04fd7b3303cfc8'

* commit 'a1ee1648690726b34e98eaf8db04fd7b3303cfc8':
  lavc/decode_video(): always unref the frame if there is no output in decode_video

Conflicts:
	libavcodec/utils.c

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

* commit 'c342132fa8a29692e28c98238e3a31da5c407e42':
  frame: copy flags in av_frame_copy_props()

Conflicts:
	libavutil/frame.c

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

* commit 'df7aba52b51007db50410abe15fe28391abd8757':
  frame: cosmetics, reindent

Conflicts:
	libavutil/frame.c

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