avformat/hdsenc: fix unintentional integer overflow in hds_write_packet()
Fixes CID1135762
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>