common: Set AV_CODEC_ID_NONE to AVCodecContext.codec_id before avcodec_open2().

AVCodecContext.codec_id is supposed to be set properly in avcodec_open2().
This avoids avcodec_open2() failure by the difference of enum AVCodecID.
For instance, when stream is encoded as AC-3,
AVCodecContext.codec_id might have been set to AV_CODEC_ID_EAC3
while AVCodec.id is set to AV_CODEC_ID_AC3.
lsmashsource: Fix a compilation with the latest ffmpeg.
lsmashsource: Use get_buffer2() instead of deprecated get_buffer().
vslsmas: Use get_buffer2() instead of deprecated get_buffer().
common: Fix a crash of direct rendering when changing decoder configuration.
lwlibav: Fix a crash when the index helper opened own parsar.
libavsmash: Initialize defalut get_buffer() of the decoder configuration hanlder.

Fix a crash of lsmashinput.aui when Libav+L-SMASH reader is used.
common: Add the log handler.
common: Fix presentation resolution when disabling direct rendering.
Merge branch 'plain' into build-msvc

Merge revision: r500
Conflicts:
	AviSynth/audio_output.cpp
	AviUtl/libav_input.c
	AviUtl/libavsmash_input.c
	VapourSynth/libavsmash_source.c
	VapourSynth/lsmashsource.c
	VapourSynth/lwlibav_source.c
	VapourSynth/video_output.c
	common/libavsmash.c
	common/lwlibav_audio.c
	common/lwlibav_dec.c