Revert "asfenc: return error on negative timestamp"

This reverts commit d1bec33b46091546c5b2e6815210e73f87abf413, it breaks
FATE.
avplay: remove the -debug option.

It just shadows the corresponding AVOption and prevents using named
constants.
pixdesc: add a function for counting planes in a pixel format.
lavc, lavfi: fix counting number of planes in AVBufferRef wrappers

Number of planes is not always equal to the number of components even
for formats marked with PIX_FMT_PLANAR -- e.g. NV12 has three components
in two planes.
buffersrc: fix a typo.

Vertical shift is log2_chroma_h, not log2_chroma_w.
lavc: update the doxy for avcodec_decode_{video,audio} wtih refcounting.
mpegvideo: fix allocation of the hwaccel_picture_private data

Signed-off-by: Anton Khirnov <anton@khirnov.net>
pthread: unref already decoded frames when flushing the decoder

Signed-off-by: Anton Khirnov <anton@khirnov.net>
h264: allocate hwaccel privdata after the frame buffer

This ensures the hwaccel privdata does not leak when a frame buffer could
not be allocated (and toggle the assert when the frame is re-used).
Having no frame buffer available is quite common when using the DXVA2
hwaccel in situations where the DXVA2 renderer is being re-allocated, for
example when moving between displays.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
mpegvideo: allocate hwaccel privdata after the frame buffer

This ensures the hwaccel privdata does not leak when a frame buffer could
not be allocated (and toggle the assert when the frame is re-used).
Having no frame buffer available is quite common when using the DXVA2
hwaccel in situations where the DXVA2 renderer is being re-allocated, for
example when moving between displays.

Signed-off-by: Anton Khirnov <anton@khirnov.net>