check that nb_streams is valid before setting stream, fix crash with jp2 which do...