hevc: Allow out of bound values for num_reorder_pics

This fixes decoding for a sample that cannot be shared

Signed-off-by: Anton Khirnov <anton@khirnov.net>
hevc: remove unused array min_cb_addr_zs

Signed-off-by: Anton Khirnov <anton@khirnov.net>
lavc: do not allocate edges in the default get_buffer2()
dump_stream: print the timebase as is, do not reduce it

It makes more sense to print the timebase exactly as it is set. Also,
this avoids a divide by zero when av_dump_format() is called on a format
context before writing the header.
output example: use the new AVFrame API for allocating the video frame
output example: use a struct to bundle the video stream variables together
output example: set output channel layout
output example: use the new AVFrame API to allocate audio frames
output example: use OutputStream for audio streams as well
output example: allocate the audio frame only once
output example: use a macro instead of a static variable
output example: store the scaling context in the stream context
output example: rewrite encoding logic

Properly generate pts for the frames sent to the encoder, avoid
using private and deprecated AVStream.pts.
output example: free the muxing format context properly
indeo2: rename stride to pitch for consistency with other Indeo decoders
indeo4: B-frames decoding

Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
Merge commit '9b60d9197970658e91daf4b586397f450de9af69'

* commit '9b60d9197970658e91daf4b586397f450de9af69':
  hevc: Allow out of bound values for num_reorder_pics

Conflicts:
	libavcodec/hevc_ps.c

See: bc21260e643c2249e38f7485bceada1d4bbb2b9a
See: ab296c7a9fe590860dc95ba97e9cbb9dde798f20
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit 'a0e1c3517a656dd32293f054a339e0ac73328138'

* commit 'a0e1c3517a656dd32293f054a339e0ac73328138':
  hevc: remove unused array min_cb_addr_zs

Conflicts:
	libavcodec/hevc_ps.c

See: f7f1f4c7ce9ce689823e13a53b694eb14cbbf6e7
Merged-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/snow: ensure the buffers have allocated edges

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit '1b04eb20f7e3f0a71f73ba91efcc3d60a435e443'

* commit '1b04eb20f7e3f0a71f73ba91efcc3d60a435e443':
  lavc: do not allocate edges in the default get_buffer2()

Conflicts:
	libavcodec/utils.c

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