avcodec/mdec: use dsp.bswap16_buf()

Signed-off-by: Paul B Mahol <onemda@gmail.com>
avcodec/cook: fix deadlock by using get_unary()

Fixes #3089.
Reported-by: Piotr Bandurski <ami_stuff@o2.pl>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
doc/examples/demuxing: reset got_frame.

Fix infinite loop at flushing.
avcodec/flacdec: make while get_bits loop more robust by checking bits left

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/flvdec: make while get_bits loop more robust by checking bits left

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/h261dec: make while get_bits loop more robust by checking bits left

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