alsdec: check block length

Fix writing over the end

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Addresses: CVE-2013-0845
Merge remote-tracking branch 'qatar/master'

* qatar/master:
  alsdec: check block length

See: 0ceca269b66ec12a23bf0907bd2c220513cdbf16
Merged-by: Michael Niedermayer <michaelni@gmx.at>
avformat/oggparseopus: factor opus_duration() out

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avformat/oggparseopus: calculate pts/dts for initial packets after seeking

based on code from oggparsevorbis
Fixes Ticket3124
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>