avformat/hdsenc: fix off by 1 error in array size check

Fixes CID1135763, CID1135764

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avformat/utils: Check avcodec_open2() return code in av_find_stream_info()

Fixes CID1135750

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