Extract some setup code into a separate function.

This allows reusing it to restore the correct settings
if setting up hardware acceleration failed.
Note: as an optimization we should not attempt to use
the hwaccel pixfmts if the codecs.conf entry disallows
them.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@36422 b3059339-0415-0410-9bf9-f77b7e298cf2
vo png: Switch to avcodec_encode_video2

The older function is deprecated and the newer function seems to not
have the minimum buffer size limitation.

Patch by Jiang Jiang >gzjjgod at gmail com<



git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@36423 b3059339-0415-0410-9bf9-f77b7e298cf2
vo png: Error handling and clean up

Simplify error path; returning 1 is obfuscated and not different
from returning VO_TRUE. We do not want to fatally error out anyway,
so printing a warning should be enough and not different from the
current behaviour.

Use av_free_packet, it is the counter part for av_init_packet .
It could e.g. potentially free side data. The buffer itself
will not be freed as is intended for our custom buffer which
we will try to re-use.



git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@36424 b3059339-0415-0410-9bf9-f77b7e298cf2
Leave it to FFmpeg to disable multithreading with hwaccel.

This fixes multithreaded software decoding of e.g. H.264 again.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@36425 b3059339-0415-0410-9bf9-f77b7e298cf2
Add define to reduce warnings.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@36426 b3059339-0415-0410-9bf9-f77b7e298cf2
configure: add config_exif for ffmpeg

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

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@36427 b3059339-0415-0410-9bf9-f77b7e298cf2
Avoid reinitializing VDPAU on e.g. simple aspect changes.

This avoids decode error if frames from before the
aspect change are used as reference frames after.
It also reduces the issues when using VDPAU together
with -lavdopts threads=n


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@36428 b3059339-0415-0410-9bf9-f77b7e298cf2
lavcac3enc: avoid code duplication.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@36429 b3059339-0415-0410-9bf9-f77b7e298cf2
Extract audio encoding code into a separate helper function.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@36430 b3059339-0415-0410-9bf9-f77b7e298cf2
Quick an inefficient hack to enable planar encoding.

Should fix bugzilla #2094.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@36431 b3059339-0415-0410-9bf9-f77b7e298cf2
Fix disabling subtitles by switching through them.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@36432 b3059339-0415-0410-9bf9-f77b7e298cf2
Support -alang and -slang for bluray://


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@36433 b3059339-0415-0410-9bf9-f77b7e298cf2
Fix channel reordering for ac3_fixed encoder.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@36434 b3059339-0415-0410-9bf9-f77b7e298cf2
ad_libmad: simplify code a bit.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@36435 b3059339-0415-0410-9bf9-f77b7e298cf2
libmad: try decoding buffered data after EOF.

Fixes bugzilla #2152.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@36436 b3059339-0415-0410-9bf9-f77b7e298cf2
avidemux: try reading ODML index if the default one is
uselessly small.

Fixes Bugzilla #2150.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@36437 b3059339-0415-0410-9bf9-f77b7e298cf2
codecs.conf: add 0x64 to g726, works on g726-test1.wav

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@36438 b3059339-0415-0410-9bf9-f77b7e298cf2
ve_lavc: simplify and support more colorspace formats.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@36439 b3059339-0415-0410-9bf9-f77b7e298cf2
muxer_lavf: partially support formats creating files own their own.

This works with e.g. image2, but is a bit messy since
using img%d.png results in mencoder itself creating
a file with exactly this name while lavf creates the
correctly numbered ones.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@36440 b3059339-0415-0410-9bf9-f77b7e298cf2
Quick hack to allow using ffmpeg's image2 demuxer.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@36441 b3059339-0415-0410-9bf9-f77b7e298cf2